| async fn foo(x: Option<bool>) { |
| fn is_send<T: Send>(_: T) {} |
| async fn foo2(x: Option<bool>) { |
| async fn bar2<T>(_: T) -> ! { |
| async fn foo3(x: Option<bool>) { |
| (Rc::new(()), bar().await); |
| async fn foo4(x: Option<bool>) { |
| is_send(foo(Some(true))); |
| //~^ ERROR cannot be sent between threads safely |
| is_send(foo2(Some(true))); |
| //~^ ERROR cannot be sent between threads safely |
| is_send(foo3(Some(true))); |
| //~^ ERROR cannot be sent between threads safely |
| is_send(foo4(Some(true))); |
| //~^ ERROR cannot be sent between threads safely |