-
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
"lifetime 'static
required" - poor diagnostics
#90600
Comments
I did some investigation and noticed that this issue is at least partially reproduced here |
I came across this issue #86759 which is describing the same problem but has what seems to me a better solution |
I experimented with skipping try_report_named_anon_conflict when static is required and its giving much better diagnostics, so ill make a PR for that once #90667 is merged. |
…ostics, r=estebank Improve diagnostics when a static lifetime is expected Makes progress towards rust-lang#90600 The diagnostics here were previously entirely removed due to giving a misleading suggestion but if we instead provide an informative label in that same location it should better help the user understand the situation. I included the example from the issue as it demonstrates an area where the diagnostics are still lacking. Happy to remove that if its just adding noise atm.
…ostics, r=estebank Improve diagnostics when a static lifetime is expected Makes progress towards rust-lang#90600 The diagnostics here were previously entirely removed due to giving a misleading suggestion but if we instead provide an informative label in that same location it should better help the user understand the situation. I included the example from the issue as it demonstrates an area where the diagnostics are still lacking. Happy to remove that if its just adding noise atm.
…ostics, r=estebank Improve diagnostics when a static lifetime is expected Makes progress towards rust-lang#90600 The diagnostics here were previously entirely removed due to giving a misleading suggestion but if we instead provide an informative label in that same location it should better help the user understand the situation. I included the example from the issue as it demonstrates an area where the diagnostics are still lacking. Happy to remove that if its just adding noise atm.
Given the following code:
The current output is:
Ideally the output should look like:
Problem occurs on both latest stable and latest nightly. (1.56 and 2021-11-04}
The text was updated successfully, but these errors were encountered: