]> git.proxmox.com Git - rustc.git/blob - src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / issue-57611-trait-alias.stderr
1 error[E0308]: mismatched types
2 --> $DIR/issue-57611-trait-alias.rs:21:9
3 |
4 LL | |x| x
5 | ^^^^^ one type is more general than the other
6 |
7 = note: expected trait `for<'r> Fn<(&'r X,)>`
8 found trait `Fn<(&X,)>`
9 note: this closure does not fulfill the lifetime requirements
10 --> $DIR/issue-57611-trait-alias.rs:21:9
11 |
12 LL | |x| x
13 | ^^^^^
14
15 error: implementation of `FnOnce` is not general enough
16 --> $DIR/issue-57611-trait-alias.rs:21:9
17 |
18 LL | |x| x
19 | ^^^^^ implementation of `FnOnce` is not general enough
20 |
21 = note: closure with signature `fn(&'2 X) -> &X` must implement `FnOnce<(&'1 X,)>`, for any lifetime `'1`...
22 = note: ...but it actually implements `FnOnce<(&'2 X,)>`, for some specific lifetime `'2`
23
24 error: aborting due to 2 previous errors
25
26 For more information about this error, try `rustc --explain E0308`.