Support self at the end of any paths in imports#152996
Support self at the end of any paths in imports#152996mu001999 wants to merge 4 commits intorust-lang:mainfrom
self at the end of any paths in imports#152996Conversation
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 |
|
Same as with imports, for |
|
Ugh, apparently things like this work. struct S {}
use S::{self as other};This isn't supposed to happen. |
What I mean is that trailing |
😂 Looks like we need |
As a follow-up PR to #146972, after this PR:
selfcan appear at the end of any paths in imports (consensus in Support importing path-segment keyword with renaming #146972 (comment))redundant_selfwill be emitted foruse ...::self [as target];oruse ...::{self [as target]};For the second, the new lint and clippy lint unnecessary_self_imports have some overlap and also cause the following known issues:
So perhaps this new lint should not be added but extend the clippy lint
unnecessary_self_imports?r? petrochenkov