1- error[E0277]: `*mut ()` cannot be shared between threads safely
2- --> $DIR/issue-70935-complex-spans.rs:17:5
3- |
4- LL | / async move {
5- LL | |
6- LL | | baz(|| async {
7- LL | | foo(x.clone());
8- LL | | }).await;
9- LL | | }
10- | |_____^ `*mut ()` cannot be shared between threads safely
11- |
12- = help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()`
13- note: required because it appears within the type `PhantomData<*mut ()>`
14- --> $SRC_DIR/core/src/marker.rs:LL:COL
15- note: required because it appears within the type `NotSync`
16- --> $DIR/issue-70935-complex-spans.rs:9:8
17- |
18- LL | struct NotSync(PhantomData<*mut ()>);
19- | ^^^^^^^
20- = note: required for `&NotSync` to implement `Send`
21- note: required because it's used within this closure
22- --> $DIR/issue-70935-complex-spans.rs:19:13
23- |
24- LL | baz(|| async {
25- | ^^
26- note: required because it's used within this `async` fn body
27- --> $DIR/issue-70935-complex-spans.rs:12:67
28- |
29- LL | async fn baz<T>(_c: impl FnMut() -> T) where T: Future<Output=()> {
30- | ___________________________________________________________________^
31- LL | | }
32- | |_^
33- note: required because it's used within this `async` block
34- --> $DIR/issue-70935-complex-spans.rs:17:5
35- |
36- LL | async move {
37- | ^^^^^^^^^^
38- note: required by a bound in an opaque type
39- --> $DIR/issue-70935-complex-spans.rs:15:37
40- |
41- LL | fn foo(x: NotSync) -> impl Future + Send {
42- | ^^^^
43-
441error[E0277]: `*mut ()` cannot be shared between threads safely
452 --> $DIR/issue-70935-complex-spans.rs:15:23
463 |
@@ -57,7 +14,7 @@ LL | struct NotSync(PhantomData<*mut ()>);
5714 | ^^^^^^^
5815 = note: required for `&NotSync` to implement `Send`
5916note: required because it's used within this closure
60- --> $DIR/issue-70935-complex-spans.rs:19 :13
17+ --> $DIR/issue-70935-complex-spans.rs:18 :13
6118 |
6219LL | baz(|| async {
6320 | ^^
@@ -74,6 +31,6 @@ note: required because it's used within this `async` block
7431LL | async move {
7532 | ^^^^^^^^^^
7633
77- error: aborting due to 2 previous errors
34+ error: aborting due to 1 previous error
7835
7936For more information about this error, try `rustc --explain E0277`.
0 commit comments