• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error[E0277]: `*const Bar` cannot be shared between threads safely
2  --> $DIR/recursive-requirements.rs:16:12
3   |
4LL |     let _: AssertSync<Foo> = unimplemented!();
5   |            ^^^^^^^^^^^^^^^ `*const Bar` cannot be shared between threads safely
6   |
7   = help: within `Foo`, the trait `Sync` is not implemented for `*const Bar`
8note: required because it appears within the type `Foo`
9  --> $DIR/recursive-requirements.rs:5:12
10   |
11LL | pub struct Foo {
12   |            ^^^
13note: required by a bound in `AssertSync`
14  --> $DIR/recursive-requirements.rs:3:22
15   |
16LL | struct AssertSync<T: Sync>(PhantomData<T>);
17   |                      ^^^^ required by this bound in `AssertSync`
18
19error[E0277]: `*const Foo` cannot be shared between threads safely
20  --> $DIR/recursive-requirements.rs:16:12
21   |
22LL |     let _: AssertSync<Foo> = unimplemented!();
23   |            ^^^^^^^^^^^^^^^ `*const Foo` cannot be shared between threads safely
24   |
25   = help: within `Foo`, the trait `Sync` is not implemented for `*const Foo`
26note: required because it appears within the type `Bar`
27  --> $DIR/recursive-requirements.rs:10:12
28   |
29LL | pub struct Bar {
30   |            ^^^
31note: required because it appears within the type `PhantomData<Bar>`
32  --> $SRC_DIR/core/src/marker.rs:LL:COL
33note: required because it appears within the type `Foo`
34  --> $DIR/recursive-requirements.rs:5:12
35   |
36LL | pub struct Foo {
37   |            ^^^
38note: required by a bound in `AssertSync`
39  --> $DIR/recursive-requirements.rs:3:22
40   |
41LL | struct AssertSync<T: Sync>(PhantomData<T>);
42   |                      ^^^^ required by this bound in `AssertSync`
43
44error: aborting due to 2 previous errors
45
46For more information about this error, try `rustc --explain E0277`.
47