-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Better compile error output when using arguments instead of types #45122
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
@@ -4,31 +4,31 @@ error: chained comparison operators require parentheses | |||
12 | println!("{:?}", (0..13).collect<Vec<i32>>()); | |||
| ^^^^^^^^ | |||
| | |||
= help: use `::<...>` instead of `<...>` if you meant to specify type arguments | |||
= help: use `::<...>` instead of `<...>` if you meant to specify type arguments or use `(...)` if you meant to specify fn arguments |
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.
This will probably look better as a second help:
on a separate line.
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 think I also would prefer a second help
The recommended changes were implemented. EDIT: Nevermind, I broke some tests 😅 |
@jean-lourenco the broken test is to be expected and correct, if you could fix it and squash all your commits into one we can approve. |
Looks like you have to update f<X>();
//~^ ERROR: chained comparison operators require parentheses
//~| HELP: use `::<...>` instead of `<...>`
//~| HELP: or use `(...)` |
output message is shown in another 'help:' block line with +100 columns formatted test adjusted
Now the tests are green 🎉 |
@bors r+ |
📌 Commit db91b00 has been approved by |
Thanks @jean-lourenco |
Better compile error output when using arguments instead of types Following @estebank sugestion on issue rust-lang#18945 (comment)
Better compile error output when using arguments instead of types Following @estebank sugestion on issue rust-lang#18945 (comment)
Better compile error output when using arguments instead of types Following @estebank sugestion on issue rust-lang#18945 (comment)
Following @estebank sugestion on issue #18945 (comment)