-
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
Added detailed error code explanation for issue E0688 in Rust compiler. #72654
Conversation
Some changes occurred in diagnostic error codes |
r? @davidtwco |
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.
Apologies for how long it's taken for this to be reviewed!
@@ -0,0 +1,36 @@ | |||
In-band lifetimes has mixed with explicit lifetime binders. |
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.
In-band lifetimes has mixed with explicit lifetime binders. | |
In-band lifetimes were mixed with explicit lifetime binders. |
} | ||
``` | ||
|
||
We cannot mix in-band lifetimes with explicit lifetime binders. |
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.
We cannot mix in-band lifetimes with explicit lifetime binders. | |
In-band lifetimes cannot be mixed with explicit lifetime binders. |
This is really just a re-phrasing of the error, it'd be great to elaborate a little - something like "a function/struct/whatever can either have explicit lifetime binders or in-band lifetimes".
For example: | ||
|
||
``` | ||
fn foo<'a, 'b>(x: &'a u32, y: &'b u32) {} // ok! |
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.
I'd also add another example where only in-band lifetimes are used (with a short sentence before each example explaining how they differ).
☔ The latest upstream changes (presumably #73924) made this pull request unmergeable. Please resolve the merge conflicts. |
Added proper error explanation for issue E0688 in the Rust compiler.
Error Code E0688
Sub Part of Issue #61137
r? @GuillaumeGomez