@@ -19,6 +19,21 @@ help: you might have intended to implement this trait for a given type
1919LL | impl X for /* Type */ {
2020 | ++++++++++++++
2121
22+ error[E0782]: expected a type, found a trait
23+ --> $DIR/wrong-lifetime-rib.rs:35:10
24+ |
25+ LL | impl X {
26+ | ^
27+ |
28+ help: you can add the `dyn` keyword if you want a trait object
29+ |
30+ LL | impl dyn X {
31+ | +++
32+ help: you might have intended to implement this trait for a given type
33+ |
34+ LL | impl X for /* Type */ {
35+ | ++++++++++++++
36+
2237error[E0116]: cannot define inherent `impl` for a type outside of the crate where the type is defined
2338 --> $DIR/wrong-lifetime-rib.rs:9:5
2439 |
@@ -40,7 +55,28 @@ LL - reuse<<<&Project> :: Ty> :: Ty as Iterator>::next;
4055LL + reuse<<<&() as Example>::Ty> :: Ty as Iterator>::next;
4156 |
4257
43- error: aborting due to 4 previous errors
58+ error[E0782]: expected a type, found a trait
59+ --> $DIR/wrong-lifetime-rib.rs:37:21
60+ |
61+ LL | let _: &X;
62+ | ^
63+ |
64+ help: you can add the `dyn` keyword if you want a trait object
65+ |
66+ LL | let _: &dyn X;
67+ | +++
68+
69+ error[E0599]: `()` is not an iterator
70+ --> $DIR/wrong-lifetime-rib.rs:36:25
71+ |
72+ LL | reuse Iterator::fold {
73+ | ^^^^ `()` is not an iterator
74+ |
75+ = note: the following trait bounds were not satisfied:
76+ `(): Iterator`
77+ which is required by `&mut (): Iterator`
78+
79+ error: aborting due to 7 previous errors
4480
45- Some errors have detailed explanations: E0116, E0223, E0423, E0782.
81+ Some errors have detailed explanations: E0116, E0223, E0423, E0599, E0782.
4682For more information about an error, try `rustc --explain E0116`.
0 commit comments