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
+22-6
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,24 @@ LL | let non_send_fut = make_non_send_future1();
16
16
LL | let _ = non_send_fut.await;
17
17
| ^^^^^^^^^^^^ await occurs here
18
18
19
+
error: future cannot be sent between threads safely
20
+
--> $DIR/issue-68112.rs:43:5
21
+
|
22
+
LL | fn require_send(_: impl Send) {}
23
+
| ------------ ---- required by this bound in `require_send`
24
+
...
25
+
LL | require_send(send_fut);
26
+
| ^^^^^^^^^^^^ future created by async block is not `Send`
27
+
|
28
+
= 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
30
+
--> $DIR/issue-68112.rs:40:17
31
+
|
32
+
LL | let _ = make_non_send_future1().await;
33
+
| ^^^^^^^^^^^^^^^^^^^^^^^ await occurs here
34
+
19
35
error[E0277]: `std::cell::RefCell<i32>` cannot be shared between threads safely
20
-
--> $DIR/issue-68112.rs:49:5
36
+
--> $DIR/issue-68112.rs:58:5
21
37
|
22
38
LL | fn require_send(_: impl Send) {}
23
39
| ------------ ---- required by this bound in `require_send`
@@ -27,16 +43,16 @@ LL | require_send(send_fut);
27
43
|
28
44
= help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell<i32>`
29
45
= note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<std::cell::RefCell<i32>>`
30
-
= note: required because it appears within the type `[static generator@$DIR/issue-68112.rs:38:31: 38:36 t:std::sync::Arc<std::cell::RefCell<i32>> {}]`
31
-
= note: required because it appears within the type `std::future::from_generator::GenFuture<[static generator@$DIR/issue-68112.rs:38:31: 38:36 t:std::sync::Arc<std::cell::RefCell<i32>> {}]>`
46
+
= note: required because it appears within the type `[static generator@$DIR/issue-68112.rs:47:31: 47:36 t:std::sync::Arc<std::cell::RefCell<i32>> {}]`
47
+
= note: required because it appears within the type `std::future::from_generator::GenFuture<[static generator@$DIR/issue-68112.rs:47:31: 47:36 t:std::sync::Arc<std::cell::RefCell<i32>> {}]>`
32
48
= note: required because it appears within the type `impl std::future::Future`
33
49
= note: required because it appears within the type `impl std::future::Future`
34
50
= note: required because it appears within the type `impl std::future::Future`
35
51
= note: required because it appears within the type `{std::future::ResumeTy, impl std::future::Future, (), i32, Ready<i32>}`
36
-
= note: required because it appears within the type `[static generator@$DIR/issue-68112.rs:44:26: 48:6 {std::future::ResumeTy, impl std::future::Future, (), i32, Ready<i32>}]`
37
-
= note: required because it appears within the type `std::future::from_generator::GenFuture<[static generator@$DIR/issue-68112.rs:44:26: 48:6 {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>}]>`
38
54
= note: required because it appears within the type `impl std::future::Future`
39
55
40
-
error: aborting due to 2 previous errors
56
+
error: aborting due to 3 previous errors
41
57
42
58
For more information about this error, try `rustc --explain E0277`.
0 commit comments