-
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
Add error file for E0152 #31957
Add error file for E0152 #31957
Conversation
Hm, the span of the duplicate is not being printed. After reviewing @Zoxc's comments on the issue I think what needs to happen is that span needs to be fixed so the error message prints the source location of the duplicate item as normal, then a second The |
8180937
to
6a72fd6
Compare
@brson: I provided more information. Does it seem enough for you? If not, what could I add? |
6a72fd6
to
8884721
Compare
8884721
to
150ac06
Compare
@brson: This is ready. |
Thanks @GuillaumeGomez. Sadly, I think there's more to do here. I didn't realize before that local definitions are checked first and then external definitions. That really changes my perspective on what this code does. First here, Second, rustc uses uncapitalized diagnostics by convention, so "Duplicate lang item found" should be "duplicate lang item found", "First defined here" should be "first defined here", "First defined in crate", should be "first defined in crate". Next, in this note where the original def was in an external create, please do not call |
18c0cba
to
7ab9345
Compare
@brson: Updated. |
@bors r+ This looks really great now. Thanks for persevering. |
📌 Commit 7ab9345 has been approved by |
It completes #31818.
However it is not complete yet:
I'm not sure yet what's the "correct" file name to display. If anyone has an idea on this, it'd be very appreciated.
r? @brson