Repository navigation
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
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 |
fcf45ca to
410d275
Compare
|
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. |
4142dfa to
20a5fb6
Compare
20a5fb6 to
1554268
Compare
|
Lintcheck changes for 1554268
This comment will be updated if you push new changes |
|
@llogiq @Jarcho #13662 (comment) The problem still exists |
| let FileName::Real(p) = cx.sess().source_map().span_to_filename(item.span) else { | ||
| self.clear(); | ||
| return; | ||
| }; | ||
| let Some(p) = p.local_path() else { | ||
| return; | ||
| }; | ||
| let Some(file_name) = p.file_name() else { | ||
| self.clear(); | ||
| return; | ||
| }; | ||
| // only check `main.rs` and `lib.rs` | ||
| if !(file_name == "main.rs" || file_name == "lib.rs") { | ||
| return; | ||
| } |
There was a problem hiding this comment.
The first symbol in the path is either a crate or a name in the current scope. For items in the current scope they're defined at either the module level or the statement level. All those at the module level can always use the self:: prefix.
|
@rustbot label lint-nominated |
|
This lint has been nominated for inclusion. |
|
☔ The latest upstream changes (possibly #13598) made this pull request unmergeable. Please resolve the merge conflicts. |
View all comments
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)