os-rust/src/test/ui/async-await/issue-68112.stderr

57 lines
3.2 KiB
Text
Raw Normal View History

2020-03-24 17:23:50 -07:00
error: future cannot be sent between threads safely
--> $DIR/issue-68112.rs:34:5
|
LL | fn require_send(_: impl Send) {}
2020-04-13 19:14:26 -07:00
| ---- required by this bound in `require_send`
2020-03-24 17:23:50 -07:00
...
LL | require_send(send_fut);
2020-03-24 18:51:16 -07:00
| ^^^^^^^^^^^^ future created by async block is not `Send`
2020-03-24 17:23:50 -07:00
|
= help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell<i32>`
2020-04-08 11:54:31 -07:00
note: future is not `Send` as it awaits another future which is not `Send`
--> $DIR/issue-68112.rs:31:17
2020-03-24 17:23:50 -07:00
|
LL | let _ = non_send_fut.await;
2020-04-08 11:54:31 -07:00
| ^^^^^^^^^^^^ await occurs here on type `impl std::future::Future`, which is not `Send`
2020-03-24 17:23:50 -07:00
2020-04-01 19:04:55 -07:00
error: future cannot be sent between threads safely
--> $DIR/issue-68112.rs:43:5
|
LL | fn require_send(_: impl Send) {}
2020-04-13 19:14:26 -07:00
| ---- required by this bound in `require_send`
2020-04-01 19:04:55 -07:00
...
LL | require_send(send_fut);
| ^^^^^^^^^^^^ future created by async block is not `Send`
|
= help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell<i32>`
2020-04-08 11:54:31 -07:00
note: future is not `Send` as it awaits another future which is not `Send`
2020-04-01 19:04:55 -07:00
--> $DIR/issue-68112.rs:40:17
|
LL | let _ = make_non_send_future1().await;
2020-04-08 11:54:31 -07:00
| ^^^^^^^^^^^^^^^^^^^^^^^ await occurs here on type `impl std::future::Future`, which is not `Send`
2020-04-01 19:04:55 -07:00
2020-03-24 17:23:50 -07:00
error[E0277]: `std::cell::RefCell<i32>` cannot be shared between threads safely
2020-04-08 11:54:31 -07:00
--> $DIR/issue-68112.rs:60:5
2020-03-24 17:23:50 -07:00
|
LL | fn require_send(_: impl Send) {}
2020-04-13 19:14:26 -07:00
| ---- required by this bound in `require_send`
2020-03-24 17:23:50 -07:00
...
LL | require_send(send_fut);
| ^^^^^^^^^^^^ `std::cell::RefCell<i32>` cannot be shared between threads safely
|
= help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell<i32>`
= note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<std::cell::RefCell<i32>>`
2020-04-01 19:04:55 -07:00
= 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>> {}]`
= 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>> {}]>`
2020-03-24 17:23:50 -07:00
= note: required because it appears within the type `impl std::future::Future`
= note: required because it appears within the type `impl std::future::Future`
= note: required because it appears within the type `impl std::future::Future`
= note: required because it appears within the type `{std::future::ResumeTy, impl std::future::Future, (), i32, Ready<i32>}`
2020-04-08 11:54:31 -07:00
= 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>}]`
= 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>}]>`
2020-03-24 17:23:50 -07:00
= note: required because it appears within the type `impl std::future::Future`
2020-04-01 19:04:55 -07:00
error: aborting due to 3 previous errors
2020-03-24 17:23:50 -07:00
For more information about this error, try `rustc --explain E0277`.