]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.min_tait.stderr
Loop over all opaque types instead of looking at just the first one with the same...
[rust.git] / src / test / ui / type-alias-impl-trait / issue-57611-trait-alias.min_tait.stderr
1 error: implementation of `FnOnce` is not general enough
2   --> $DIR/issue-57611-trait-alias.rs:20:16
3    |
4 LL |     type Bar = impl Baz<Self, Self>;
5    |                ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
6    |
7    = note: closure with signature `fn(&'2 X) -> &X` must implement `FnOnce<(&'1 X,)>`, for any lifetime `'1`...
8    = note: ...but it actually implements `FnOnce<(&'2 X,)>`, for some specific lifetime `'2`
9
10 error[E0308]: mismatched types
11   --> $DIR/issue-57611-trait-alias.rs:20:16
12    |
13 LL |     type Bar = impl Baz<Self, Self>;
14    |                ^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
15    |
16    = note: expected type `for<'r> Fn<(&'r X,)>`
17               found type `Fn<(&'<empty> X,)>`
18 note: this closure does not fulfill the lifetime requirements
19   --> $DIR/issue-57611-trait-alias.rs:28:9
20    |
21 LL |         |x| x
22    |         ^^^^^
23
24 error: implementation of `FnOnce` is not general enough
25   --> $DIR/issue-57611-trait-alias.rs:20:16
26    |
27 LL |     type Bar = impl Baz<Self, Self>;
28    |                ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
29    |
30    = note: closure with signature `fn(&'2 X) -> &'2 X` must implement `FnOnce<(&'1 X,)>`, for any lifetime `'1`...
31    = note: ...but it actually implements `FnOnce<(&'2 X,)>`, for some specific lifetime `'2`
32
33 error[E0308]: mismatched types
34   --> $DIR/issue-57611-trait-alias.rs:20:16
35    |
36 LL |     type Bar = impl Baz<Self, Self>;
37    |                ^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
38    |
39    = note: expected type `for<'r> Fn<(&'r X,)>`
40               found type `Fn<(&'<empty> X,)>`
41 note: this closure does not fulfill the lifetime requirements
42   --> $DIR/issue-57611-trait-alias.rs:28:9
43    |
44 LL |         |x| x
45    |         ^^^^^
46
47 error: implementation of `FnOnce` is not general enough
48   --> $DIR/issue-57611-trait-alias.rs:20:16
49    |
50 LL |     type Bar = impl Baz<Self, Self>;
51    |                ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
52    |
53    = note: closure with signature `fn(&'2 X) -> &'2 X` must implement `FnOnce<(&'1 X,)>`, for any lifetime `'1`...
54    = note: ...but it actually implements `FnOnce<(&'2 X,)>`, for some specific lifetime `'2`
55
56 error: aborting due to 5 previous errors
57
58 For more information about this error, try `rustc --explain E0308`.