]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc1623.stderr
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / rfc1623.stderr
1 error[E0308]: mismatched types
2   --> $DIR/rfc1623.rs:28:8
3    |
4 LL |     f: &id,
5    |        ^^^ one type is more general than the other
6    |
7    = note: expected trait `for<'a, 'b> Fn<(&'a Foo<'b>,)>`
8               found trait `Fn<(&Foo<'_>,)>`
9
10 error[E0308]: mismatched types
11   --> $DIR/rfc1623.rs:28:8
12    |
13 LL |     f: &id,
14    |        ^^^ one type is more general than the other
15    |
16    = note: expected trait `for<'a, 'b> Fn<(&'a Foo<'b>,)>`
17               found trait `Fn<(&Foo<'_>,)>`
18
19 error: implementation of `FnOnce` is not general enough
20   --> $DIR/rfc1623.rs:28:8
21    |
22 LL |     f: &id,
23    |        ^^^ implementation of `FnOnce` is not general enough
24    |
25    = note: `fn(&'2 Foo<'_>) -> &'2 Foo<'_> {id::<&'2 Foo<'_>>}` must implement `FnOnce<(&'1 Foo<'b>,)>`, for any lifetime `'1`...
26    = note: ...but it actually implements `FnOnce<(&'2 Foo<'_>,)>`, for some specific lifetime `'2`
27
28 error: implementation of `FnOnce` is not general enough
29   --> $DIR/rfc1623.rs:28:8
30    |
31 LL |     f: &id,
32    |        ^^^ implementation of `FnOnce` is not general enough
33    |
34    = note: `fn(&Foo<'2>) -> &Foo<'2> {id::<&Foo<'2>>}` must implement `FnOnce<(&'a Foo<'1>,)>`, for any lifetime `'1`...
35    = note: ...but it actually implements `FnOnce<(&Foo<'2>,)>`, for some specific lifetime `'2`
36
37 error: aborting due to 4 previous errors
38
39 For more information about this error, try `rustc --explain E0308`.