-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Fix help for duplicated names: extern crate (...) as (...)
#45856
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
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.
Seems reasonable.
16 | extern crate m2 as m1; | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
| | | ||
| `m1` reimported here |
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.
FWIW, I find this message confusing. I think it's the phrasing "import of the extern crate m1
", whereas I see this statement as importing the crate m2
-- but aliasing it to m1
. I wonder if some small tweaks to the wording might help. Or maybe it's just fine as is, it's kind of a corner case, and if all goes to plan extern crate
is going away anyway.
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.
The same wording issue happens with use
.
@bors r+ -- larger changes seem out of scope |
📌 Commit 3bd7b92 has been approved by |
On the case of duplicated names caused by an `extern crate` statement with a rename, don't include the inline suggestion, instead using a span label with only the text to avoid incorrect rust code output.
@bors r=nikomatsakis |
📌 Commit d0339c7 has been approved by |
Fix help for duplicated names: `extern crate (...) as (...)` On the case of duplicated names caused by an `extern crate` statement with a rename, don't include the inline suggestion, instead using a span label with only the text to avoid incorrect rust code output. Fix rust-lang#45829.
On the case of duplicated names caused by an
extern crate
statementwith a rename, don't include the inline suggestion, instead using a span
label with only the text to avoid incorrect rust code output.
Fix #45829.