@@ -268,7 +268,7 @@ LL | use self as name;
268268 | +++++++
269269
270270error: imports need to be explicitly named
271- --> $DIR/use-path-segment-kw.rs:176 :15
271+ --> $DIR/use-path-segment-kw.rs:178 :15
272272 |
273273LL | use ::self;
274274 | ^^^^
@@ -279,7 +279,7 @@ LL | use ::self as name;
279279 | +++++++
280280
281281error: imports need to be explicitly named
282- --> $DIR/use-path-segment-kw.rs:179 :16
282+ --> $DIR/use-path-segment-kw.rs:181 :16
283283 |
284284LL | use ::{self};
285285 | ^^^^
@@ -290,7 +290,7 @@ LL | use ::{self as name};
290290 | +++++++
291291
292292error: imports need to be explicitly named
293- --> $DIR/use-path-segment-kw.rs:192 :20
293+ --> $DIR/use-path-segment-kw.rs:194 :20
294294 |
295295LL | use crate::self;
296296 | ^^^^
@@ -301,7 +301,7 @@ LL | use crate::self as name;
301301 | +++++++
302302
303303error: imports need to be explicitly named
304- --> $DIR/use-path-segment-kw.rs:194 :21
304+ --> $DIR/use-path-segment-kw.rs:196 :21
305305 |
306306LL | use crate::{self};
307307 | ^^^^
@@ -312,7 +312,7 @@ LL | use crate::{self as name};
312312 | +++++++
313313
314314error: imports need to be explicitly named
315- --> $DIR/use-path-segment-kw.rs:198 :20
315+ --> $DIR/use-path-segment-kw.rs:200 :20
316316 |
317317LL | use super::self;
318318 | ^^^^
@@ -323,7 +323,7 @@ LL | use super::self as name;
323323 | +++++++
324324
325325error: imports need to be explicitly named
326- --> $DIR/use-path-segment-kw.rs:200 :21
326+ --> $DIR/use-path-segment-kw.rs:202 :21
327327 |
328328LL | use super::{self};
329329 | ^^^^
@@ -334,7 +334,7 @@ LL | use super::{self as name};
334334 | +++++++
335335
336336error: imports need to be explicitly named
337- --> $DIR/use-path-segment-kw.rs:204 :19
337+ --> $DIR/use-path-segment-kw.rs:206 :19
338338 |
339339LL | use self::self;
340340 | ^^^^
@@ -345,7 +345,7 @@ LL | use self::self as name;
345345 | +++++++
346346
347347error: imports need to be explicitly named
348- --> $DIR/use-path-segment-kw.rs:206 :20
348+ --> $DIR/use-path-segment-kw.rs:208 :20
349349 |
350350LL | use self::{self};
351351 | ^^^^
@@ -753,7 +753,7 @@ LL | use $crate::{self as name};
753753 | +++++++
754754
755755error[E0433]: cannot find module or crate `foobar` in the crate root
756- --> $DIR/use-path-segment-kw.rs:184 :17
756+ --> $DIR/use-path-segment-kw.rs:186 :17
757757 |
758758LL | pub use foobar::qux::self;
759759 | ^^^^^^ use of unresolved module or unlinked crate `foobar`
@@ -764,7 +764,7 @@ LL + extern crate foobar;
764764 |
765765
766766error[E0433]: cannot find module or crate `foobar` in the crate root
767- --> $DIR/use-path-segment-kw.rs:188 :17
767+ --> $DIR/use-path-segment-kw.rs:190 :17
768768 |
769769LL | pub use foobar::baz::{self};
770770 | ^^^^^^ use of unresolved module or unlinked crate `foobar`
@@ -775,7 +775,7 @@ LL + extern crate foobar;
775775 |
776776
777777error[E0432]: unresolved import `foobar`
778- --> $DIR/use-path-segment-kw.rs:186 :17
778+ --> $DIR/use-path-segment-kw.rs:188 :17
779779 |
780780LL | pub use foobar::self as _self3;
781781 | ^^^^^^
@@ -786,7 +786,7 @@ LL | pub use self::foobar::self as _self3;
786786 | ++++++
787787
788788error[E0432]: unresolved import `foobar`
789- --> $DIR/use-path-segment-kw.rs:189 :17
789+ --> $DIR/use-path-segment-kw.rs:191 :17
790790 |
791791LL | pub use foobar::{self as _nested_self3};
792792 | ^^^^^^
@@ -796,12 +796,6 @@ help: a similar path exists
796796LL | pub use self::foobar::{self as _nested_self3};
797797 | ++++++
798798
799- error[E0433]: `self` in paths can only be used in start position
800- --> $DIR/use-path-segment-kw.rs:209:36
801- |
802- LL | type D7 = crate::foo::bar::self;
803- | ^^^^ can only be used in path start position
804-
805799error[E0573]: expected type, found module `$crate`
806800 --> $DIR/use-path-segment-kw.rs:10:19
807801 |
@@ -813,6 +807,17 @@ LL | macro_dollar_crate!();
813807 |
814808 = note: this error originates in the macro `macro_dollar_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
815809
810+ error[E0573]: expected type, found module `$crate::self`
811+ --> $DIR/use-path-segment-kw.rs:62:20
812+ |
813+ LL | type A10 = $crate::self;
814+ | ^^^^^^^^^^^^ not a type
815+ ...
816+ LL | macro_dollar_crate!();
817+ | --------------------- in this macro invocation
818+ |
819+ = note: this error originates in the macro `macro_dollar_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
820+
816821error[E0573]: expected type, found module `crate`
817822 --> $DIR/use-path-segment-kw.rs:95:19
818823 |
@@ -843,6 +848,42 @@ error[E0573]: expected type, found module `self`
843848LL | type D1 = self;
844849 | ^^^^ not a type
845850
851+ error[E0573]: expected type, found module `::self`
852+ --> $DIR/use-path-segment-kw.rs:175:19
853+ |
854+ LL | type D2 = ::self;
855+ | ^^^^^^ not a type
856+
857+ error[E0573]: expected type, found module `foobar::self`
858+ --> $DIR/use-path-segment-kw.rs:185:19
859+ |
860+ LL | type D3 = foobar::self;
861+ | ^^^^^^^^^^^^ not a type
862+
863+ error[E0573]: expected type, found module `crate::self`
864+ --> $DIR/use-path-segment-kw.rs:193:19
865+ |
866+ LL | type D4 = crate::self;
867+ | ^^^^^^^^^^^ not a type
868+
869+ error[E0573]: expected type, found module `super::self`
870+ --> $DIR/use-path-segment-kw.rs:199:19
871+ |
872+ LL | type D5 = super::self;
873+ | ^^^^^^^^^^^ not a type
874+
875+ error[E0573]: expected type, found module `self::self`
876+ --> $DIR/use-path-segment-kw.rs:205:19
877+ |
878+ LL | type D6 = self::self;
879+ | ^^^^^^^^^^ not a type
880+
881+ error[E0573]: expected type, found module `crate::foo::bar::self`
882+ --> $DIR/use-path-segment-kw.rs:211:19
883+ |
884+ LL | type D7 = crate::foo::bar::self;
885+ | ^^^^^^^^^^^^^^^^^^^^^ not a type
886+
846887error[E0433]: global paths cannot start with `$crate`
847888 --> $DIR/use-path-segment-kw.rs:14:21
848889 |
@@ -931,17 +972,6 @@ LL | macro_dollar_crate!();
931972 |
932973 = note: this error originates in the macro `macro_dollar_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
933974
934- error[E0433]: `self` in paths can only be used in start position
935- --> $DIR/use-path-segment-kw.rs:62:28
936- |
937- LL | type A10 = $crate::self;
938- | ^^^^ can only be used in path start position
939- ...
940- LL | macro_dollar_crate!();
941- | --------------------- in this macro invocation
942- |
943- = note: this error originates in the macro `macro_dollar_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
944-
945975error[E0433]: global paths cannot start with `crate`
946976 --> $DIR/use-path-segment-kw.rs:99:21
947977 |
@@ -990,36 +1020,6 @@ error[E0433]: `super` in paths can only be used in start position
9901020LL | type C4 = crate::super;
9911021 | ^^^^^ can only be used in path start position
9921022
993- error[E0433]: global paths cannot start with `self`
994- --> $DIR/use-path-segment-kw.rs:175:21
995- |
996- LL | type D2 = ::self;
997- | ^^^^ cannot start with this
998-
999- error[E0433]: `self` in paths can only be used in start position
1000- --> $DIR/use-path-segment-kw.rs:183:27
1001- |
1002- LL | type D3 = foobar::self;
1003- | ^^^^ can only be used in path start position
1004-
1005- error[E0433]: `self` in paths can only be used in start position
1006- --> $DIR/use-path-segment-kw.rs:191:26
1007- |
1008- LL | type D4 = crate::self;
1009- | ^^^^ can only be used in path start position
1010-
1011- error[E0433]: `self` in paths can only be used in start position
1012- --> $DIR/use-path-segment-kw.rs:197:26
1013- |
1014- LL | type D5 = super::self;
1015- | ^^^^ can only be used in path start position
1016-
1017- error[E0433]: `self` in paths can only be used in start position
1018- --> $DIR/use-path-segment-kw.rs:203:25
1019- |
1020- LL | type D6 = self::self;
1021- | ^^^^ can only be used in path start position
1022-
10231023error: aborting due to 115 previous errors
10241024
10251025Some errors have detailed explanations: E0432, E0433, E0573.
0 commit comments