-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Incorrect lifetime suggested in diagnostics help message #35619
Comments
I agree that incorrect help suggestions are terrible and we should try much harder not to make them. I changed the title to be more about this specific message though since ISTM that "never suggest obviously illegal solutions" is quite a tall order. Let's solve this one! cc @jonathandturner bogus help is super counterproductive. |
So this particular problem appears to be that we are failing to check trait object bounds, which didn't exist at the time this code was implemented. But there are also deeper problems with this check -- for example, it doesn't consider the possibility |
triage: P-medium |
|
@arielb1 I don't know how you came to this conclusion, but codegen is only one of Rust's many functions, and many of them can be "wrong". Which I-tag do you think applies here? |
The compiler team was using I-wrong for bugs where the compiler silently emits wrong code. I suppose that silent standard library breakage also counts. Diagnostic problems are just |
Explicit lifetime suggestions were removed, this is fixed. |
Specifically, removed in #37057 |
I got the following suggestion for correcting error:
But (irrelevant if this is going towards better solution or not) the suggestion is clearly illegal, because it's missing
'c
which exists in the return type.The text was updated successfully, but these errors were encountered: