You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/test/ui/async-await/issue-68112.stderr
+7-9
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,11 @@ LL | require_send(send_fut);
8
8
| ^^^^^^^^^^^^ future created by async block is not `Send`
9
9
|
10
10
= help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell<i32>`
11
-
note: future is not `Send` as this value is used in an await
11
+
note: future is not `Send` as it awaits another future which is not `Send`
12
12
--> $DIR/issue-68112.rs:31:17
13
13
|
14
-
LL | let non_send_fut = make_non_send_future1();
15
-
| ------------ created here
16
14
LL | let _ = non_send_fut.await;
17
-
| ^^^^^^^^^^^^ await occurs here
15
+
| ^^^^^^^^^^^^ await occurs here on type `impl std::future::Future`, which is not `Send`
18
16
19
17
error: future cannot be sent between threads safely
20
18
--> $DIR/issue-68112.rs:43:5
@@ -26,14 +24,14 @@ LL | require_send(send_fut);
26
24
| ^^^^^^^^^^^^ future created by async block is not `Send`
27
25
|
28
26
= help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell<i32>`
29
-
note: future is not `Send` as this value is used in an await
27
+
note: future is not `Send` as it awaits another future which is not `Send`
30
28
--> $DIR/issue-68112.rs:40:17
31
29
|
32
30
LL | let _ = make_non_send_future1().await;
33
-
| ^^^^^^^^^^^^^^^^^^^^^^^ await occurs here
31
+
| ^^^^^^^^^^^^^^^^^^^^^^^ await occurs here on type `impl std::future::Future`, which is not `Send`
34
32
35
33
error[E0277]: `std::cell::RefCell<i32>` cannot be shared between threads safely
36
-
--> $DIR/issue-68112.rs:58:5
34
+
--> $DIR/issue-68112.rs:60:5
37
35
|
38
36
LL | fn require_send(_: impl Send) {}
39
37
| ------------ ---- required by this bound in `require_send`
@@ -49,8 +47,8 @@ LL | require_send(send_fut);
49
47
= note: required because it appears within the type `impl std::future::Future`
50
48
= note: required because it appears within the type `impl std::future::Future`
51
49
= note: required because it appears within the type `{std::future::ResumeTy, impl std::future::Future, (), i32, Ready<i32>}`
52
-
= note: required because it appears within the type `[static generator@$DIR/issue-68112.rs:53:26: 57:6 {std::future::ResumeTy, impl std::future::Future, (), i32, Ready<i32>}]`
53
-
= note: required because it appears within the type `std::future::from_generator::GenFuture<[static generator@$DIR/issue-68112.rs:53:26: 57:6 {std::future::ResumeTy, impl std::future::Future, (), i32, Ready<i32>}]>`
50
+
= note: required because it appears within the type `[static generator@$DIR/issue-68112.rs:55:26: 59:6 {std::future::ResumeTy, impl std::future::Future, (), i32, Ready<i32>}]`
51
+
= note: required because it appears within the type `std::future::from_generator::GenFuture<[static generator@$DIR/issue-68112.rs:55:26: 59:6 {std::future::ResumeTy, impl std::future::Future, (), i32, Ready<i32>}]>`
54
52
= note: required because it appears within the type `impl std::future::Future`
Copy file name to clipboardexpand all lines: src/test/ui/generator/not-send-sync.stderr
+2-2
Original file line number
Diff line number
Diff line change
@@ -21,11 +21,11 @@ LL | assert_sync(|| {
21
21
| ^^^^^^^^^^^ generator is not `Sync`
22
22
|
23
23
= help: within `[generator@$DIR/not-send-sync.rs:9:17: 13:6 {std::cell::Cell<i32>, ()}]`, the trait `std::marker::Sync` is not implemented for `std::cell::Cell<i32>`
24
-
note: generator is not `Sync` as this value is used across an yield
24
+
note: generator is not `Sync` as this value is used across a yield
25
25
--> $DIR/not-send-sync.rs:12:9
26
26
|
27
27
LL | let a = Cell::new(2);
28
-
| - has type `std::cell::Cell<i32>`
28
+
| - has type `std::cell::Cell<i32>` which is not `Sync`
29
29
LL | yield;
30
30
| ^^^^^ yield occurs here, with `a` maybe used later
0 commit comments