]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc1623.nll.stderr
Merge commit 'd0cf3481a84e3aa68c2f185c460e282af36ebc42' into clippyup
[rust.git] / src / test / ui / rfc1623.nll.stderr
1 error[E0308]: mismatched types
2   --> $DIR/rfc1623.rs:25:35
3    |
4 LL |   static SOME_STRUCT: &SomeStruct = &SomeStruct {
5    |  ___________________________________^
6 LL | |     foo: &Foo { bools: &[false, true] },
7 LL | |     bar: &Bar { bools: &[true, true] },
8 LL | |     f: &id,
9 LL | |
10 LL | | };
11    | |_^ one type is more general than the other
12    |
13    = note: expected type `for<'a, 'b> Fn<(&'a Foo<'b>,)>`
14               found type `Fn<(&Foo<'_>,)>`
15
16 error[E0308]: mismatched types
17   --> $DIR/rfc1623.rs:25:35
18    |
19 LL |   static SOME_STRUCT: &SomeStruct = &SomeStruct {
20    |  ___________________________________^
21 LL | |     foo: &Foo { bools: &[false, true] },
22 LL | |     bar: &Bar { bools: &[true, true] },
23 LL | |     f: &id,
24 LL | |
25 LL | | };
26    | |_^ one type is more general than the other
27    |
28    = note: expected type `for<'a, 'b> Fn<(&'a Foo<'b>,)>`
29               found type `Fn<(&Foo<'_>,)>`
30
31 error: implementation of `FnOnce` is not general enough
32   --> $DIR/rfc1623.rs:25:35
33    |
34 LL |   static SOME_STRUCT: &SomeStruct = &SomeStruct {
35    |  ___________________________________^
36 LL | |     foo: &Foo { bools: &[false, true] },
37 LL | |     bar: &Bar { bools: &[true, true] },
38 LL | |     f: &id,
39 LL | |
40 LL | | };
41    | |_^ implementation of `FnOnce` is not general enough
42    |
43    = note: `fn(&'2 Foo<'_>) -> &'2 Foo<'_> {id::<&'2 Foo<'_>>}` must implement `FnOnce<(&'1 Foo<'b>,)>`, for any lifetime `'1`...
44    = note: ...but it actually implements `FnOnce<(&'2 Foo<'_>,)>`, for some specific lifetime `'2`
45
46 error: implementation of `FnOnce` is not general enough
47   --> $DIR/rfc1623.rs:25:35
48    |
49 LL |   static SOME_STRUCT: &SomeStruct = &SomeStruct {
50    |  ___________________________________^
51 LL | |     foo: &Foo { bools: &[false, true] },
52 LL | |     bar: &Bar { bools: &[true, true] },
53 LL | |     f: &id,
54 LL | |
55 LL | | };
56    | |_^ implementation of `FnOnce` is not general enough
57    |
58    = note: `fn(&Foo<'2>) -> &Foo<'2> {id::<&Foo<'2>>}` must implement `FnOnce<(&'a Foo<'1>,)>`, for any lifetime `'1`...
59    = note: ...but it actually implements `FnOnce<(&Foo<'2>,)>`, for some specific lifetime `'2`
60
61 error: aborting due to 4 previous errors
62
63 For more information about this error, try `rustc --explain E0308`.