]> git.proxmox.com Git - rustc.git/blob - src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.full_tait.stderr
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / issue-57611-trait-alias.full_tait.stderr
1 warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
2 --> $DIR/issue-57611-trait-alias.rs:8:32
3 |
4 LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
5 | ^^^^^^^^^^^^^^^^^^^^^
6 |
7 = note: `#[warn(incomplete_features)]` on by default
8 = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
9
10 error: implementation of `FnOnce` is not general enough
11 --> $DIR/issue-57611-trait-alias.rs:20:16
12 |
13 LL | type Bar = impl Baz<Self, Self>;
14 | ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
15 |
16 = note: closure with signature `fn(&'2 X) -> &X` must implement `FnOnce<(&'1 X,)>`, for any lifetime `'1`...
17 = note: ...but it actually implements `FnOnce<(&'2 X,)>`, for some specific lifetime `'2`
18
19 error[E0308]: mismatched types
20 --> $DIR/issue-57611-trait-alias.rs:20:16
21 |
22 LL | type Bar = impl Baz<Self, Self>;
23 | ^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
24 |
25 = note: expected type `for<'r> Fn<(&'r X,)>`
26 found type `Fn<(&'<empty> X,)>`
27 note: this closure does not fulfill the lifetime requirements
28 --> $DIR/issue-57611-trait-alias.rs:28:9
29 |
30 LL | |x| x
31 | ^^^^^
32
33 error: implementation of `FnOnce` is not general enough
34 --> $DIR/issue-57611-trait-alias.rs:20:16
35 |
36 LL | type Bar = impl Baz<Self, Self>;
37 | ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
38 |
39 = note: closure with signature `fn(&'2 X) -> &'2 X` must implement `FnOnce<(&'1 X,)>`, for any lifetime `'1`...
40 = note: ...but it actually implements `FnOnce<(&'2 X,)>`, for some specific lifetime `'2`
41
42 error[E0308]: mismatched types
43 --> $DIR/issue-57611-trait-alias.rs:20:16
44 |
45 LL | type Bar = impl Baz<Self, Self>;
46 | ^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
47 |
48 = note: expected type `for<'r> Fn<(&'r X,)>`
49 found type `Fn<(&'<empty> X,)>`
50 note: this closure does not fulfill the lifetime requirements
51 --> $DIR/issue-57611-trait-alias.rs:28:9
52 |
53 LL | |x| x
54 | ^^^^^
55
56 error: implementation of `FnOnce` is not general enough
57 --> $DIR/issue-57611-trait-alias.rs:20:16
58 |
59 LL | type Bar = impl Baz<Self, Self>;
60 | ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
61 |
62 = note: closure with signature `fn(&'2 X) -> &'2 X` must implement `FnOnce<(&'1 X,)>`, for any lifetime `'1`...
63 = note: ...but it actually implements `FnOnce<(&'2 X,)>`, for some specific lifetime `'2`
64
65 error: aborting due to 5 previous errors; 1 warning emitted
66
67 For more information about this error, try `rustc --explain E0308`.