-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Only print parameters with elided lifetimes in elision error messages. #33708
Conversation
r? @arielb1 (rust_highfive has picked a reviewer for you, use r? to override) |
dc9bab2
to
36ff0a9
Compare
When displaying the function parameters for a lifetime elision error message, this changes it to first filter out the parameters that don't have elided lifetimes. Fixes rust-lang#30255.
36ff0a9
to
7fef162
Compare
true | ||
} else { | ||
false | ||
}; |
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 is just let any_lifetimes = elided_len > 0
.
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.
Better, replace !any_lifetimes
below with elided_len == 0
.
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.
Good point. I've done this.
@bors r+ |
📌 Commit a50c82b has been approved by |
Only print parameters with elided lifetimes in elision error messages. When displaying the function parameters for a lifetime elision error message, this changes it to first filter out the parameters that don't have elided lifetimes. Fixes rust-lang#30255.
When displaying the function parameters for a lifetime elision error message,
this changes it to first filter out the parameters that don't have elided
lifetimes.
Fixes #30255.