11error: trait implementation can only be restricted to ancestor modules
2- --> $DIR/restriction_resolution_errors.rs:14 :21
2+ --> $DIR/restriction_resolution_errors.rs:17 :21
33 |
44LL | pub impl(in ::std) trait T2 {}
55 | ^^^^^
66
77error: trait implementation can only be restricted to ancestor modules
8- --> $DIR/restriction_resolution_errors.rs:16 :21
8+ --> $DIR/restriction_resolution_errors.rs:19 :21
99 |
1010LL | pub impl(in self::c) trait T3 {}
1111 | ^^^^^^^
1212
1313error: trait implementation can only be restricted to ancestor modules
14- --> $DIR/restriction_resolution_errors.rs:18 :21
14+ --> $DIR/restriction_resolution_errors.rs:21 :21
1515 |
1616LL | pub impl(in super::d) trait T4 {}
1717 | ^^^^^^^^
1818
1919error[E0433]: too many leading `super` keywords
20- --> $DIR/restriction_resolution_errors.rs:24 :35
20+ --> $DIR/restriction_resolution_errors.rs:27 :35
2121 |
2222LL | pub impl(in super::super::super) trait T7 {}
2323 | ^^^^^ there are too many leading `super` keywords
2424
2525error: trait implementation can only be restricted to ancestor modules
26- --> $DIR/restriction_resolution_errors.rs:34 :21
26+ --> $DIR/restriction_resolution_errors.rs:37 :21
2727 |
2828LL | pub impl(in self::f) trait L1 {}
2929 | ^^^^^^^
3030
3131error: trait implementation can only be restricted to ancestor modules
32- --> $DIR/restriction_resolution_errors.rs:38 :21
32+ --> $DIR/restriction_resolution_errors.rs:41 :21
3333 |
3434LL | pub impl(in super::h) trait L3 {}
3535 | ^^^^^^^^
3636
3737error: trait implementation can only be restricted to ancestor modules
38- --> $DIR/restriction_resolution_errors.rs:47 :13
38+ --> $DIR/restriction_resolution_errors.rs:50 :13
3939 |
4040LL | pub impl(in crate::a) trait T13 {}
4141 | ^^^^^^^^
4242
4343error[E0433]: too many leading `super` keywords
44- --> $DIR/restriction_resolution_errors.rs:54 :10
44+ --> $DIR/restriction_resolution_errors.rs:57 :10
4545 |
4646LL | pub impl(super) trait T17 {}
4747 | ^^^^^ there are too many leading `super` keywords
4848
4949error: trait implementation can only be restricted to ancestor modules
50- --> $DIR/restriction_resolution_errors.rs:57:13
50+ --> $DIR/restriction_resolution_errors.rs:59:13
51+ |
52+ LL | pub impl(in external) trait T18 {}
53+ | ^^^^^^^^
54+
55+ error: trait implementation can only be restricted to ancestor modules
56+ --> $DIR/restriction_resolution_errors.rs:62:13
5157 |
5258LL | pub impl(in crate::j) trait L4 {}
5359 | ^^^^^^^^
5460
5561error: trait implementation can only be restricted to ancestor modules
56- --> $DIR/restriction_resolution_errors.rs:73 :21
62+ --> $DIR/restriction_resolution_errors.rs:78 :21
5763 |
5864LL | pub impl(in crate::m2) trait U2 {}
5965 | ^^^^^^^^^
6066
6167error: trait implementation can only be restricted to ancestor modules
62- --> $DIR/restriction_resolution_errors.rs:75 :21
68+ --> $DIR/restriction_resolution_errors.rs:80 :21
6369 |
6470LL | pub impl(in m6::m5) trait U4 {}
6571 | ^^^^^^
6672
6773error[E0433]: cannot find module or crate `a` in this scope
68- --> $DIR/restriction_resolution_errors.rs:12 :21
74+ --> $DIR/restriction_resolution_errors.rs:15 :21
6975 |
7076LL | pub impl(in a::b) trait T1 {}
7177 | ^ use of unresolved module or unlinked crate `a`
@@ -81,25 +87,25 @@ LL + use a;
8187 |
8288
8389error[E0433]: cannot find module `c` in the crate root
84- --> $DIR/restriction_resolution_errors.rs:20 :28
90+ --> $DIR/restriction_resolution_errors.rs:23 :28
8591 |
8692LL | pub impl(in crate::c) trait T5 {}
8793 | ^ not found in the crate root
8894
8995error[E0577]: expected module, found enum `super::E`
90- --> $DIR/restriction_resolution_errors.rs:22 :21
96+ --> $DIR/restriction_resolution_errors.rs:25 :21
9197 |
9298LL | pub impl(in super::E) trait T6 {}
9399 | ^^^^^^^^ not a module
94100
95101error[E0577]: expected module, found enum `super::G`
96- --> $DIR/restriction_resolution_errors.rs:36 :21
102+ --> $DIR/restriction_resolution_errors.rs:39 :21
97103 |
98104LL | pub impl(in super::G) trait L2 {}
99105 | ^^^^^^^^ not a module
100106
101107error[E0577]: expected module, found enum `crate::a::E`
102- --> $DIR/restriction_resolution_errors.rs:49 :13
108+ --> $DIR/restriction_resolution_errors.rs:52 :13
103109 |
104110LL | pub mod b {
105111 | --------- similarly named module `b` defined here
@@ -114,7 +120,7 @@ LL + pub impl(in crate::a::b) trait T14 {}
114120 |
115121
116122error[E0577]: expected module, found enum `crate::I`
117- --> $DIR/restriction_resolution_errors.rs:59 :13
123+ --> $DIR/restriction_resolution_errors.rs:64 :13
118124 |
119125LL | pub mod a {
120126 | --------- similarly named module `a` defined here
@@ -129,12 +135,12 @@ LL + pub impl(in crate::a) trait L5 {}
129135 |
130136
131137error[E0577]: expected module, found enum `m7`
132- --> $DIR/restriction_resolution_errors.rs:76 :21
138+ --> $DIR/restriction_resolution_errors.rs:81 :21
133139 |
134140LL | pub impl(in m7) trait U5 {}
135141 | ^^ not a module
136142
137- error: aborting due to 18 previous errors
143+ error: aborting due to 19 previous errors
138144
139145Some errors have detailed explanations: E0433, E0577.
140146For more information about an error, try `rustc --explain E0433`.
0 commit comments