Skip to content
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

Merged
merged 1 commit into from
Nov 4, 2014
Merged

Conversation

ftxqxd
Copy link
Contributor

@ftxqxd ftxqxd commented Oct 18, 2014

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.

@@ -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
Copy link
Member

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?

Copy link
Contributor Author

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.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, good.

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Nov 4, 2014
bors added a commit that referenced this pull request Nov 4, 2014
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.
@bors bors closed this Nov 4, 2014
@bors bors merged commit 5bf9ef2 into rust-lang:master Nov 4, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Sep 25, 2024
…eykril

fix: Don't complete `;` when in closure return expression

Completing it will break syntax.

Fixes rust-lang#18130.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert notes to helps in the compiler
3 participants