| error[E0277]: `dyn for<'a, 'b> std::ops::Fn(&'a Foo<'b>) -> &'a Foo<'b>` cannot be shared between threads safely |
| --> $DIR/rfc1623.rs:21:1 |
| | |
| LL | / static SOME_STRUCT: &SomeStruct = &SomeStruct { |
| LL | | foo: &Foo { bools: &[false, true] }, |
| LL | | bar: &Bar { bools: &[true, true] }, |
| LL | | f: &id, |
| LL | | |
| LL | | }; |
| | |__^ `dyn for<'a, 'b> std::ops::Fn(&'a Foo<'b>) -> &'a Foo<'b>` cannot be shared between threads safely |
| | |
| = help: within `&SomeStruct`, the trait `std::marker::Sync` is not implemented for `dyn for<'a, 'b> std::ops::Fn(&'a Foo<'b>) -> &'a Foo<'b>` |
| = note: required because it appears within the type `&dyn for<'a, 'b> std::ops::Fn(&'a Foo<'b>) -> &'a Foo<'b>` |
| = note: required because it appears within the type `SomeStruct` |
| = note: required because it appears within the type `&SomeStruct` |
| = note: shared static variables must have a type that implements `Sync` |
| |
| error: higher-ranked subtype error |
| --> $DIR/rfc1623.rs:21:35 |
| | |
| LL | static SOME_STRUCT: &SomeStruct = &SomeStruct { |
| | ___________________________________^ |
| LL | | foo: &Foo { bools: &[false, true] }, |
| LL | | bar: &Bar { bools: &[true, true] }, |
| LL | | f: &id, |
| LL | | |
| LL | | }; |
| | |_^ |
| |
| error: higher-ranked subtype error |
| --> $DIR/rfc1623.rs:21:35 |
| | |
| LL | static SOME_STRUCT: &SomeStruct = &SomeStruct { |
| | ___________________________________^ |
| LL | | foo: &Foo { bools: &[false, true] }, |
| LL | | bar: &Bar { bools: &[true, true] }, |
| LL | | f: &id, |
| LL | | |
| LL | | }; |
| | |_^ |
| |
| error: higher-ranked subtype error |
| --> $DIR/rfc1623.rs:21:35 |
| | |
| LL | static SOME_STRUCT: &SomeStruct = &SomeStruct { |
| | ___________________________________^ |
| LL | | foo: &Foo { bools: &[false, true] }, |
| LL | | bar: &Bar { bools: &[true, true] }, |
| LL | | f: &id, |
| LL | | |
| LL | | }; |
| | |_^ |
| |
| error: higher-ranked subtype error |
| --> $DIR/rfc1623.rs:21:35 |
| | |
| LL | static SOME_STRUCT: &SomeStruct = &SomeStruct { |
| | ___________________________________^ |
| LL | | foo: &Foo { bools: &[false, true] }, |
| LL | | bar: &Bar { bools: &[true, true] }, |
| LL | | f: &id, |
| LL | | |
| LL | | }; |
| | |_^ |
| |
| error: aborting due to 5 previous errors |
| |
| For more information about this error, try `rustc --explain E0277`. |