-
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
Format self correctly #42700
Comments
Once @gaurikholkar's PR lands, I'll try to write up some mentoring instructions for this. |
So actually, this test:
presently generates an "old-style" inference error:
This is because we ruled out |
Here is an example where there is no potential confusion around the return type, but we still currently use the old-school errors: struct Foo {
field: i32
}
impl Foo {
fn foo<'a>(&self, mut x: Vec<&'a Foo>) {
x.push(self);
}
}
fn main() { } I think we should present this error as:
|
Main difference is the wording, we don't want to say "change the type of |
Hello @nikomatsakis, hello @gaurikholkar I've picked this up. Will ping you if needed 😛 |
@nikomatsakis a small chunk of these messages are also triggering E0623 now as per the return type and self PR right? I'm guessing the adding of EBR and LBR has also reduced this set of messages. |
|
It may be that the current output is good enough. The bug was filed to give a suggestion like "try changing to |
I believe we should add the suggestion back, proposing constraining the |
Triage: no change. |
Fix the formatting of
self
in the error message.should actually be
cc @nikomatsakis
The text was updated successfully, but these errors were encountered: