1 error[E0308]: mismatched types
2 --> $DIR/rfc1623.rs:22:35
4 LL | static SOME_STRUCT: &SomeStruct = SomeStruct {
5 | ___________________________________^
6 LL | | foo: &Foo { bools: &[false, true] },
7 LL | | bar: &Bar { bools: &[true, true] },
12 | |_^ expected `&SomeStruct<'static, 'static, 'static>`, found struct `SomeStruct`
14 help: consider borrowing here
16 LL | static SOME_STRUCT: &SomeStruct = &SomeStruct {
17 LL | foo: &Foo { bools: &[false, true] },
18 LL | bar: &Bar { bools: &[true, true] },
24 error[E0631]: type mismatch in function arguments
25 --> $DIR/rfc1623.rs:25:8
27 LL | fn id<T>(t: T) -> T {
28 | ------------------- found signature of `fn(_) -> _`
31 | ^^^ expected signature of `for<'a, 'b> fn(&'a Foo<'b>) -> _`
33 = note: required for the cast to the object type `dyn for<'a, 'b> std::ops::Fn(&'a Foo<'b>) -> &'a Foo<'b>`
35 error[E0271]: type mismatch resolving `for<'a, 'b> <fn(_) -> _ {id::<_>} as std::ops::FnOnce<(&'a Foo<'b>,)>>::Output == &'a Foo<'b>`
36 --> $DIR/rfc1623.rs:25:8
39 | ^^^ expected bound lifetime parameter 'a, found concrete lifetime
41 = note: required for the cast to the object type `dyn for<'a, 'b> std::ops::Fn(&'a Foo<'b>) -> &'a Foo<'b>`
43 error: aborting due to 3 previous errors
45 Some errors have detailed explanations: E0271, E0308, E0631.
46 For more information about an error, try `rustc --explain E0271`.