-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Errors with the same span print the span once #5798
Conversation
before:
after:
before:
after:
|
Awesome! Though I'd like to get a dev in here to confirm that they like this change wrt how notes get pushed to the end. In particular, how does this change handle borrowing errors, where the error itself is followed by a note like "loan of foo granted here" ? I hadn't considered this when I originally opened #4569, it may not even have been implemented back then. |
I generally like this a lot. I'm not sure, as @bstrie mentions, how well this plays with borrow-check errors. Can you try a couple of those to see? |
Do you mean kind of this test? before
after ( note: prior loan as mutable granted here )
before
after ( note: prior loan as mutable granted here )
|
Hm, that definitely seems problematic. Is it difficult to have those notes printed after the errors rather than before them? |
Yeah. Maybe I don't understand the structure of the patch, but I wonder the same question: can notes come after errors? Or does that undermine the whole logic of consolidating messages? |
what kind of error message style do you want?
|
I changed the order. like this.(Style 2)
|
r? @brson |
Thanks @recrack. Sorry for the delay. |
@brson re-r? Fixed. Compile-test fail case.
|
Add test for `needless_range_loop` issue Closes rust-lang#2277 This was fixed when we fixed rust-lang#2542. changelog: none
Fix #4569.