1 error[E0277]: `dyn for<'a, 'b> Fn(&'a Foo<'b>) -> &'a Foo<'b>` cannot be shared between threads safely
2 --> $DIR/rfc1623.rs:21:1
4 LL | / static SOME_STRUCT: &SomeStruct = &SomeStruct {
5 LL | | foo: &Foo { bools: &[false, true] },
6 LL | | bar: &Bar { bools: &[true, true] },
10 | |__^ `dyn for<'a, 'b> Fn(&'a Foo<'b>) -> &'a Foo<'b>` cannot be shared between threads safely
12 = help: within `&SomeStruct`, the trait `Sync` is not implemented for `dyn for<'a, 'b> Fn(&'a Foo<'b>) -> &'a Foo<'b>`
13 = note: required because it appears within the type `&dyn for<'a, 'b> Fn(&'a Foo<'b>) -> &'a Foo<'b>`
14 = note: required because it appears within the type `SomeStruct`
15 = note: required because it appears within the type `&SomeStruct`
16 = note: shared static variables must have a type that implements `Sync`
18 error: higher-ranked subtype error
19 --> $DIR/rfc1623.rs:21:35
21 LL | static SOME_STRUCT: &SomeStruct = &SomeStruct {
22 | ___________________________________^
23 LL | | foo: &Foo { bools: &[false, true] },
24 LL | | bar: &Bar { bools: &[true, true] },
30 error: higher-ranked subtype error
31 --> $DIR/rfc1623.rs:21:35
33 LL | static SOME_STRUCT: &SomeStruct = &SomeStruct {
34 | ___________________________________^
35 LL | | foo: &Foo { bools: &[false, true] },
36 LL | | bar: &Bar { bools: &[true, true] },
42 error: higher-ranked subtype error
43 --> $DIR/rfc1623.rs:21:35
45 LL | static SOME_STRUCT: &SomeStruct = &SomeStruct {
46 | ___________________________________^
47 LL | | foo: &Foo { bools: &[false, true] },
48 LL | | bar: &Bar { bools: &[true, true] },
54 error: higher-ranked subtype error
55 --> $DIR/rfc1623.rs:21:35
57 LL | static SOME_STRUCT: &SomeStruct = &SomeStruct {
58 | ___________________________________^
59 LL | | foo: &Foo { bools: &[false, true] },
60 LL | | bar: &Bar { bools: &[true, true] },
66 error: aborting due to 5 previous errors
68 For more information about this error, try `rustc --explain E0277`.