Conversation
This comment has been minimized.
This comment has been minimized.
178d259 to
abd6031
Compare
This comment has been minimized.
This comment has been minimized.
abd6031 to
3102edf
Compare
This comment has been minimized.
This comment has been minimized.
3102edf to
c206a47
Compare
self appear at the end of any paths in importsself at the end of any paths in imports
This comment has been minimized.
This comment has been minimized.
c206a47 to
d7a8a0a
Compare
d7a8a0a to
d845289
Compare
This comment has been minimized.
This comment has been minimized.
d845289 to
77169f5
Compare
This comment has been minimized.
This comment has been minimized.
77169f5 to
ce8d16a
Compare
This comment has been minimized.
This comment has been minimized.
b4d62d4 to
9ac9e00
Compare
This comment has been minimized.
This comment has been minimized.
9ac9e00 to
39dc3a0
Compare
|
It looks like #146972 (comment) suggests to support trailing However, if we are doing it, then I think it's time to abandon the whole " |
Semantics of trailing But what will trailing |
…r=petrochenkov Print path root when printing path Extracted from rust-lang#152996. r? petrochenkov
…r=petrochenkov Print path root when printing path Extracted from rust-lang#152996. r? petrochenkov
…r=petrochenkov Print path root when printing path Extracted from rust-lang#152996. r? petrochenkov
…r=petrochenkov Print path root when printing path Extracted from rust-lang#152996. r? petrochenkov
…r=petrochenkov Print path root when printing path Extracted from rust-lang#152996. r? petrochenkov
0eee7bc to
bcd6516
Compare
|
@rustbot review |
This comment has been minimized.
This comment has been minimized.
|
@rustbot author |
This comment has been minimized.
This comment has been minimized.
|
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different main 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. |
|
This code currently compiles in stable rust: struct Thing;
use Thing::{self as Alias};If this code will stop compiling with this PR, then this PR needs a crater run. |
|
Yes, we'll certainly run crater. |
|
Let's perhaps split this into 2 steps.
The first part may require a new deprecation lint for the |
|
@rustbot review |
|
Could you limit this PR to just the first step from #152996 (comment)? |
View all comments
As a follow-up PR to #146972, after this PR:
selfcan appear in import paths (as the part of the consensus in Support importing path-segment keyword with renaming #146972 (comment))use ...::self [as target];will be equivalent touse ...::{self [as target]};struct S {}; use S::{self as Other};will be rejectedThis PR used to add a new lint
redundant_self, which would lintuse ...::self [as target];anduse ...::{self [as target]};, and the last commit fixes all warnings emitted by this lint.But this lint and clippy lint unnecessary_self_imports have some overlap. And
use std::io::self;is not equivalent touse std::ioin fact for now, the new lint will also cause the following known issue:So I removed this lint, and I think what it does should be done by extending the clippy lint
unnecessary_self_imports.r? petrochenkov