]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc1623.nll.stderr
Auto merge of #75936 - sdroege:chunks-exact-construction-bounds-check, r=nagisa
[rust.git] / src / test / ui / rfc1623.nll.stderr
1 error[E0277]: `dyn for<'a, 'b> std::ops::Fn(&'a Foo<'b>) -> &'a Foo<'b>` cannot be shared between threads safely
2   --> $DIR/rfc1623.rs:21:1
3    |
4 LL | / static SOME_STRUCT: &SomeStruct = &SomeStruct {
5 LL | |     foo: &Foo { bools: &[false, true] },
6 LL | |     bar: &Bar { bools: &[true, true] },
7 LL | |     f: &id,
8 LL | |
9 LL | | };
10    | |__^ `dyn for<'a, 'b> std::ops::Fn(&'a Foo<'b>) -> &'a Foo<'b>` cannot be shared between threads safely
11    |
12    = 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>`
13    = note: required because it appears within the type `&dyn for<'a, 'b> std::ops::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`
17
18 error: higher-ranked subtype error
19   --> $DIR/rfc1623.rs:21:35
20    |
21 LL |   static SOME_STRUCT: &SomeStruct = &SomeStruct {
22    |  ___________________________________^
23 LL | |     foo: &Foo { bools: &[false, true] },
24 LL | |     bar: &Bar { bools: &[true, true] },
25 LL | |     f: &id,
26 LL | |
27 LL | | };
28    | |_^
29
30 error: higher-ranked subtype error
31   --> $DIR/rfc1623.rs:21:35
32    |
33 LL |   static SOME_STRUCT: &SomeStruct = &SomeStruct {
34    |  ___________________________________^
35 LL | |     foo: &Foo { bools: &[false, true] },
36 LL | |     bar: &Bar { bools: &[true, true] },
37 LL | |     f: &id,
38 LL | |
39 LL | | };
40    | |_^
41
42 error: higher-ranked subtype error
43   --> $DIR/rfc1623.rs:21:35
44    |
45 LL |   static SOME_STRUCT: &SomeStruct = &SomeStruct {
46    |  ___________________________________^
47 LL | |     foo: &Foo { bools: &[false, true] },
48 LL | |     bar: &Bar { bools: &[true, true] },
49 LL | |     f: &id,
50 LL | |
51 LL | | };
52    | |_^
53
54 error: higher-ranked subtype error
55   --> $DIR/rfc1623.rs:21:35
56    |
57 LL |   static SOME_STRUCT: &SomeStruct = &SomeStruct {
58    |  ___________________________________^
59 LL | |     foo: &Foo { bools: &[false, true] },
60 LL | |     bar: &Bar { bools: &[true, true] },
61 LL | |     f: &id,
62 LL | |
63 LL | | };
64    | |_^
65
66 error: aborting due to 5 previous errors
67
68 For more information about this error, try `rustc --explain E0277`.