-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Correct detection of elided lifetimes in impl-trait. #106501
Conversation
Makes sense. @bors r+ |
&& let hir::LifetimeName::Param(param_id) = lifetime_ref.res | ||
&& let Some(generics) = self.tcx.hir().get_generics(self.tcx.local_parent(param_id)) | ||
&& let Some(param) = generics.params.iter().find(|p| p.def_id == param_id) | ||
&& param.is_elided_lifetime() |
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.
With this PR, the error message still reads as ""anonymous lifetimes in impl Trait
are unstable"
should it change to "elided lifetimes" instead of "anonymous lifetimes"?
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.
(this feedback need not block the landing of this PR. It was just something I noticed while looking it over)
☀️ Test successful - checks-actions |
Finished benchmarking commit (0fb8b72): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
|
…mulacrum [beta] backport rollup * Revert "Make nested RPITIT inherit the parent opaque's generics." rust-lang#106759 * Fix mpsc::SyncSender spinning behavior rust-lang#106701 * rustdoc: fix outdated lint section of the book rust-lang#106605 * Do not filter substs in remap_generic_params_to_declaration_params. rust-lang#106503 * Correct detection of elided lifetimes in impl-trait. rust-lang#106501 * Bump rust-installer rust-lang#106196 * Don't panic on stable since miri is not available there rust-lang#105901
Fixes #106338
r? @compiler-errors
cc @pnkfelix