]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issues/issue-65436-raw-ptr-not-send.rs
Auto merge of #83152 - guswynn:jemallocator_part2, r=Mark-Simulacrum
[rust.git] / src / test / ui / async-await / issues / issue-65436-raw-ptr-not-send.rs
1 // edition:2018
2
3 struct Foo(*const u8);
4
5 unsafe impl Send for Foo {}
6
7 async fn bar(_: Foo) {}
8
9 fn assert_send<T: Send>(_: T) {}
10
11 fn main() {
12     assert_send(async {
13     //~^ ERROR future cannot be sent between threads safely
14         bar(Foo(std::ptr::null())).await;
15     })
16 }