fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0277]: `*mut ()` cannot be shared between threads safely 2 --> $DIR/issue-70935-complex-spans.rs:15:23 3 | 4LL | fn foo(x: NotSync) -> impl Future + Send { 5 | ^^^^^^^^^^^^^^^^^^ `*mut ()` cannot be shared between threads safely 6 | 7 = help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()` 8note: required because it appears within the type `PhantomData<*mut ()>` 9 --> $SRC_DIR/core/src/marker.rs:LL:COL 10note: required because it appears within the type `NotSync` 11 --> $DIR/issue-70935-complex-spans.rs:9:8 12 | 13LL | struct NotSync(PhantomData<*mut ()>); 14 | ^^^^^^^ 15 = note: required for `&NotSync` to implement `Send` 16note: required because it's used within this closure 17 --> $DIR/issue-70935-complex-spans.rs:18:13 18 | 19LL | baz(|| async { 20 | ^^ 21note: required because it's used within this `async fn` body 22 --> $DIR/issue-70935-complex-spans.rs:12:67 23 | 24LL | async fn baz<T>(_c: impl FnMut() -> T) where T: Future<Output=()> { 25 | ___________________________________________________________________^ 26LL | | } 27 | |_^ 28 = note: required because it captures the following types: `impl Future<Output = ()>` 29note: required because it's used within this `async` block 30 --> $DIR/issue-70935-complex-spans.rs:17:5 31 | 32LL | / async move { 33LL | | baz(|| async { 34LL | | foo(x.clone()); 35LL | | }).await; 36LL | | } 37 | |_____^ 38 39error: aborting due to previous error 40 41For more information about this error, try `rustc --explain E0277`.