1 error[E0308]: mismatched types
2 --> $DIR/rfc1623.rs:25:35
4 LL | static SOME_STRUCT: &SomeStruct = &SomeStruct {
5 | ___________________________________^
6 LL | | foo: &Foo { bools: &[false, true] },
7 LL | | bar: &Bar { bools: &[true, true] },
11 | |_^ one type is more general than the other
13 = note: expected type `for<'a, 'b> Fn<(&'a Foo<'b>,)>`
14 found type `Fn<(&Foo<'_>,)>`
16 error[E0308]: mismatched types
17 --> $DIR/rfc1623.rs:25:35
19 LL | static SOME_STRUCT: &SomeStruct = &SomeStruct {
20 | ___________________________________^
21 LL | | foo: &Foo { bools: &[false, true] },
22 LL | | bar: &Bar { bools: &[true, true] },
26 | |_^ one type is more general than the other
28 = note: expected type `for<'a, 'b> Fn<(&'a Foo<'b>,)>`
29 found type `Fn<(&Foo<'_>,)>`
31 error: implementation of `FnOnce` is not general enough
32 --> $DIR/rfc1623.rs:25:35
34 LL | static SOME_STRUCT: &SomeStruct = &SomeStruct {
35 | ___________________________________^
36 LL | | foo: &Foo { bools: &[false, true] },
37 LL | | bar: &Bar { bools: &[true, true] },
41 | |_^ implementation of `FnOnce` is not general enough
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`
46 error: implementation of `FnOnce` is not general enough
47 --> $DIR/rfc1623.rs:25:35
49 LL | static SOME_STRUCT: &SomeStruct = &SomeStruct {
50 | ___________________________________^
51 LL | | foo: &Foo { bools: &[false, true] },
52 LL | | bar: &Bar { bools: &[true, true] },
56 | |_^ implementation of `FnOnce` is not general enough
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`
61 error: aborting due to 4 previous errors
63 For more information about this error, try `rustc --explain E0308`.