-
Notifications
You must be signed in to change notification settings - Fork 1.8k
new lint: use_crate_prefix_for_self_imports #13662
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
base: master
Are you sure you want to change the base?
new lint: use_crate_prefix_for_self_imports #13662
Conversation
2a70749 to
bfc0849
Compare
f74a6bc to
6a0c669
Compare
6a0c669 to
7633f16
Compare
|
So, as you know we discussed this on zulip a while ago. The upshot is that we have two acceptable options:
Do you intend to continue working on this? |
|
@rustbot author |
7633f16 to
5817b6f
Compare
tests/ui-cargo/use_crate_prefix_for_self_imports/pass_sibling_comment/src/main.rs
Show resolved
Hide resolved
840f04d to
9e1dbdc
Compare
|
Don't lint if mod and use in the same block |
a500545 to
a3f5529
Compare
|
The problem of |
|
What does that mean? |
|
Although pass all tests, but if copy |
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
10b927e to
c4aa68c
Compare
|
@samueltardieu @llogiq Hi, ready for another review |
cargo uibless
``` mod foo; use foo; ```
``` use foo; mod foo; ```
c4aa68c to
fcf45ca
Compare
|
☔ The latest upstream changes (possibly e121ab8) made this pull request unmergeable. Please resolve the merge conflicts. |
changelog: [
use_crate_prefix_for_self_imports]: new lintfix #13645
Only check main.rs and lib.rs
Known problem
TODO
Question
Although pass all tests, but if copy
lintcheckto/tmp, clippy will report two warnings (expected)