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 --> $DIR/rfc1623.rs:11:8
17 LL | struct SomeStruct<'x, 'y, 'z: 'x> {
19 = note: required because it appears within the type `&SomeStruct`
20 = note: shared static variables must have a type that implements `Sync`
22 error: higher-ranked subtype error
23 --> $DIR/rfc1623.rs:21:35
25 LL | static SOME_STRUCT: &SomeStruct = &SomeStruct {
26 | ___________________________________^
27 LL | | foo: &Foo { bools: &[false, true] },
28 LL | | bar: &Bar { bools: &[true, true] },
34 error: higher-ranked subtype error
35 --> $DIR/rfc1623.rs:21:35
37 LL | static SOME_STRUCT: &SomeStruct = &SomeStruct {
38 | ___________________________________^
39 LL | | foo: &Foo { bools: &[false, true] },
40 LL | | bar: &Bar { bools: &[true, true] },
46 error: higher-ranked subtype error
47 --> $DIR/rfc1623.rs:21:35
49 LL | static SOME_STRUCT: &SomeStruct = &SomeStruct {
50 | ___________________________________^
51 LL | | foo: &Foo { bools: &[false, true] },
52 LL | | bar: &Bar { bools: &[true, true] },
58 error: higher-ranked subtype error
59 --> $DIR/rfc1623.rs:21:35
61 LL | static SOME_STRUCT: &SomeStruct = &SomeStruct {
62 | ___________________________________^
63 LL | | foo: &Foo { bools: &[false, true] },
64 LL | | bar: &Bar { bools: &[true, true] },
70 error: aborting due to 5 previous errors
72 For more information about this error, try `rustc --explain E0277`.