-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 suggestion for duplicated import. #57973
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
src/test/ui/issues/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr
Outdated
Show resolved
Hide resolved
| | ^^^^^^^^^^^^^^^^^^^^^- | ||
| |_|____________________| | ||
| | help: remove unnecessary import | ||
| `derive_a` 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.
Great behavior, although we probably should make sure we keep the #[macro_use]
in the remaining extern
statement... (not necessary in this PR)
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've changed this to prefer keeping imports with attributes.
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.
It didn't seem to work in this case, but only address if you have time.
20d0eda
to
1bf26e9
Compare
r? @estebank if that's OK. |
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.
LGTM, few nitpicks inline.
1bf26e9
to
2c83c30
Compare
This commit adds a suggestion when a import is duplicated (ie. the same name is used twice trying to import the same thing) to remove the second import.
2c83c30
to
1595163
Compare
@bors r+ |
📌 Commit 1595163 has been approved by |
⌛ Testing commit 1595163 with merge 2e4c395588b3a70b13989656af07b08da2be208f... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
⌛ Testing commit 1595163 with merge c6669166b92ff816adb807f6b4e87bcbfc37aa40... |
💔 Test failed - status-appveyor |
Wut @bors retry |
Add suggestion for duplicated import. Fixes #52891. This PR adds a suggestion when a import is duplicated (ie. the same name is used twice trying to import the same thing) to remove the second import.
☀️ Test successful - checks-travis, status-appveyor |
Fixes #52891.
This PR adds a suggestion when a import is duplicated (ie. the same name
is used twice trying to import the same thing) to remove the second
import.