]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.nll.stderr
Auto merge of #95315 - compiler-errors:pointee-fix, r=pnkfelix
[rust.git] / src / test / ui / type-alias-impl-trait / issue-57611-trait-alias.nll.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-57611-trait-alias.rs:25:9
3    |
4 LL |         |x| x
5    |         ^^^^^ one type is more general than the other
6    |
7    = note: expected type `for<'r> Fn<(&'r X,)>`
8               found type `Fn<(&X,)>`
9 note: this closure does not fulfill the lifetime requirements
10   --> $DIR/issue-57611-trait-alias.rs:25:9
11    |
12 LL |         |x| x
13    |         ^^^^^
14
15 error: implementation of `FnOnce` is not general enough
16   --> $DIR/issue-57611-trait-alias.rs:25: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`.