-
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
Convert some notes to help messages #18132
Conversation
@@ -38,6 +38,6 @@ fn main() { | |||
.map(|x| x) | |||
.filter(|&&x| x == 1) | |||
.filter_map; //~ ERROR attempted to take value of method `filter_map` on type | |||
//~^ NOTE maybe a missing `()` to call it? If not, try an anonymous function. | |||
//~^ HELP maybe a `()` to call it is missing |
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.
Does the compiletest driver actually support these?
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.
Yes, it generically supports any kind of message; I could add a new type of message, foo
, to the compiler, and it would automatically support them. There are plenty of tests which use NOTE
, and yet there are no mentions of the word note
in src/compiletest
other than a few debug print messages.
(Plus, I tested it with an invalid message.)
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.
Ok, good.
54f5754
to
a69c6a0
Compare
Closes #18126. At the moment this mostly only changes notes that are particularly help-oriented or directly suggest the user to do something to help messages, and does not change messages that simply explain an error message further. If it is decided that those messages should also be help messages, I can add them to this PR, but for now I’m excluding them as I believe that changing those messages might leave very few places where notes would be appropriate.
…eykril fix: Don't complete `;` when in closure return expression Completing it will break syntax. Fixes rust-lang#18130.
Closes #18126.
At the moment this mostly only changes notes that are particularly help-oriented or directly suggest the user to do something to help messages, and does not change messages that simply explain an error message further. If it is decided that those messages should also be help messages, I can add them to this PR, but for now I’m excluding them as I believe that changing those messages might leave very few places where notes would be appropriate.