@@ -7,107 +7,47 @@ LL | const C: u32 = 0;
77LL | reuse <F as Trait>::C;
88 | ^^^^^^^^^^^^^^^^^^^^^^ does not match trait
99
10- error: failed to resolve delegation callee
11- --> $DIR/bad-resolve.rs:23:25
12- |
13- LL | reuse <F as Trait>::C;
14- | ^
15-
1610error[E0324]: item `Type` is an associated method, which doesn't match its trait `Trait`
17- --> $DIR/bad-resolve.rs:27 :5
11+ --> $DIR/bad-resolve.rs:26 :5
1812 |
1913LL | type Type;
2014 | ---------- item in trait
2115...
2216LL | reuse <F as Trait>::Type;
2317 | ^^^^^^^^^^^^^^^^^^^^^^^^^ does not match trait
2418
25- error: failed to resolve delegation callee
26- --> $DIR/bad-resolve.rs:27:25
27- |
28- LL | reuse <F as Trait>::Type;
29- | ^^^^
30-
3119error[E0407]: method `baz` is not a member of trait `Trait`
32- --> $DIR/bad-resolve.rs:31 :5
20+ --> $DIR/bad-resolve.rs:29 :5
3321 |
3422LL | reuse <F as Trait>::baz;
3523 | ^^^^^^^^^^^^^^^^^^^^---^
3624 | | |
3725 | | help: there is an associated function with a similar name: `bar`
3826 | not a member of trait `Trait`
3927
40- error: failed to resolve delegation callee
41- --> $DIR/bad-resolve.rs:31:25
42- |
43- LL | reuse <F as Trait>::baz;
44- | ^^^
45-
4628error[E0407]: method `foo2` is not a member of trait `Trait`
47- --> $DIR/bad-resolve.rs:39 :5
29+ --> $DIR/bad-resolve.rs:36 :5
4830 |
4931LL | reuse Trait::foo2 { self.0 }
5032 | ^^^^^^^^^^^^^----^^^^^^^^^^^
5133 | | |
5234 | | help: there is an associated function with a similar name: `foo`
5335 | not a member of trait `Trait`
5436
55- error: failed to resolve delegation callee
56- --> $DIR/bad-resolve.rs:39:18
57- |
58- LL | reuse Trait::foo2 { self.0 }
59- | ^^^^
60-
61- error: failed to resolve delegation callee
62- --> $DIR/bad-resolve.rs:46:27
63- |
64- LL | reuse unresolved_prefix::{a, b, c};
65- | ^
66-
67- error: failed to resolve delegation callee
68- --> $DIR/bad-resolve.rs:46:30
69- |
70- LL | reuse unresolved_prefix::{a, b, c};
71- | ^
72-
73- error: failed to resolve delegation callee
74- --> $DIR/bad-resolve.rs:46:33
75- |
76- LL | reuse unresolved_prefix::{a, b, c};
77- | ^
78-
79- error: failed to resolve delegation callee
80- --> $DIR/bad-resolve.rs:50:16
81- |
82- LL | reuse prefix::{self, super, crate};
83- | ^^^^
84-
85- error: failed to resolve delegation callee
86- --> $DIR/bad-resolve.rs:50:22
87- |
88- LL | reuse prefix::{self, super, crate};
89- | ^^^^^
90-
91- error: failed to resolve delegation callee
92- --> $DIR/bad-resolve.rs:50:29
93- |
94- LL | reuse prefix::{self, super, crate};
95- | ^^^^^
96-
9737error[E0423]: expected function, found associated constant `Trait::C`
9838 --> $DIR/bad-resolve.rs:23:11
9939 |
10040LL | reuse <F as Trait>::C;
10141 | ^^^^^^^^^^^^^^^ not a function
10242
10343error[E0575]: expected method or associated constant, found associated type `Trait::Type`
104- --> $DIR/bad-resolve.rs:27 :11
44+ --> $DIR/bad-resolve.rs:26 :11
10545 |
10646LL | reuse <F as Trait>::Type;
10747 | ^^^^^^^^^^^^^^^^^^ not a method or associated constant
10848
10949error[E0576]: cannot find method or associated constant `baz` in trait `Trait`
110- --> $DIR/bad-resolve.rs:31 :25
50+ --> $DIR/bad-resolve.rs:29 :25
11151 |
11252LL | fn bar() {}
11353 | -------- similarly named associated function `bar` defined here
@@ -122,13 +62,13 @@ LL + reuse <F as Trait>::bar;
12262 |
12363
12464error[E0425]: cannot find function `foo` in this scope
125- --> $DIR/bad-resolve.rs:37 :11
65+ --> $DIR/bad-resolve.rs:34 :11
12666 |
12767LL | reuse foo { &self.0 }
12868 | ^^^ not found in this scope
12969
13070error[E0425]: cannot find function `foo2` in trait `Trait`
131- --> $DIR/bad-resolve.rs:39 :18
71+ --> $DIR/bad-resolve.rs:36 :18
13272 |
13373LL | fn foo(&self, x: i32) -> i32 { x }
13474 | ---------------------------- similarly named associated function `foo` defined here
@@ -143,7 +83,7 @@ LL + reuse Trait::foo { self.0 }
14383 |
14484
14585error[E0423]: expected function, found module `prefix::self`
146- --> $DIR/bad-resolve.rs:50 :7
86+ --> $DIR/bad-resolve.rs:43 :7
14787 |
14888LL | reuse prefix::{self, super, crate};
14989 | ^^^^^^ not a function
@@ -158,20 +98,20 @@ LL | impl Trait for S {
15898 | ^^^^^^^^^^^^^^^^ missing `Type` in implementation
15999
160100error[E0433]: cannot find module or crate `unresolved_prefix` in this scope
161- --> $DIR/bad-resolve.rs:46 :7
101+ --> $DIR/bad-resolve.rs:42 :7
162102 |
163103LL | reuse unresolved_prefix::{a, b, c};
164104 | ^^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `unresolved_prefix`
165105 |
166106 = help: you might be missing a crate named `unresolved_prefix`
167107
168108error[E0433]: `crate` in paths can only be used in start position
169- --> $DIR/bad-resolve.rs:50 :29
109+ --> $DIR/bad-resolve.rs:43 :29
170110 |
171111LL | reuse prefix::{self, super, crate};
172112 | ^^^^^ can only be used in path start position
173113
174- error: aborting due to 23 previous errors
114+ error: aborting due to 13 previous errors
175115
176116Some errors have detailed explanations: E0046, E0324, E0407, E0423, E0425, E0433, E0575, E0576.
177117For more information about an error, try `rustc --explain E0046`.
0 commit comments