-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not rely on names to find lifetimes. #129388
Conversation
rustbot has assigned @petrochenkov. Use |
Do you have any idea of why the spans change? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh -- it's because we're not just returning the first lifetime named '_
for elided lifetimes, but we're actually getting the right def span. OK, makes sense to me.
r? compiler-errors @bors r+ rollup |
…-errors Do not rely on names to find lifetimes. For some reason, we were trying to find the lifetime parameter from its name, instead of using the def_id we have. This PR uses it instead. This changes some ui tests, I think to be more sensible.
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#128432 (WASI: forbid `unsafe_op_in_unsafe_fn` for `std::{os, sys}`) - rust-lang#129373 (Add missing module flags for CFI and KCFI sanitizers) - rust-lang#129374 (Use `assert_unsafe_precondition!` in `AsciiChar::digit_unchecked`) - rust-lang#129376 (Change `assert_unsafe_precondition` docs to refer to `check_language_ub`) - rust-lang#129382 (Add `const_cell_into_inner` to `OnceCell`) - rust-lang#129387 (Advise against removing the remaining Python scripts from `tests/run-make`) - rust-lang#129388 (Do not rely on names to find lifetimes.) - rust-lang#129395 (Pretty-print own args of existential projections (dyn-Trait w/ GAT constraints)) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#129388 - cjgillot:region-def-id, r=compiler-errors Do not rely on names to find lifetimes. For some reason, we were trying to find the lifetime parameter from its name, instead of using the def_id we have. This PR uses it instead. This changes some ui tests, I think to be more sensible.
For some reason, we were trying to find the lifetime parameter from its name, instead of using the def_id we have.
This PR uses it instead. This changes some ui tests, I think to be more sensible.