2020-09-02 02:40:56 -05:00
|
|
|
error[E0277]: `dyn for<'a, 'b> Fn(&'a Foo<'b>) -> &'a Foo<'b>` cannot be shared between threads safely
|
2020-06-08 18:12:01 -05:00
|
|
|
--> $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 | | };
|
2020-09-02 02:40:56 -05:00
|
|
|
| |__^ `dyn for<'a, 'b> Fn(&'a Foo<'b>) -> &'a Foo<'b>` cannot be shared between threads safely
|
2020-06-08 18:12:01 -05:00
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= help: within `&SomeStruct`, the trait `Sync` is not implemented for `dyn for<'a, 'b> Fn(&'a Foo<'b>) -> &'a Foo<'b>`
|
|
|
|
= note: required because it appears within the type `&dyn for<'a, 'b> Fn(&'a Foo<'b>) -> &'a Foo<'b>`
|
2020-06-08 18:12:01 -05:00
|
|
|
= 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`.
|