summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/issues/issue-65436-raw-ptr-not-send.rs
blob: ef6f105f34abb3e7dfb1728dff1d0c03d015cb0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// edition:2018
// check-pass

struct Foo(*const u8);

unsafe impl Send for Foo {}

async fn bar(_: Foo) {}

fn assert_send<T: Send>(_: T) {}

fn main() {
    assert_send(async {
        bar(Foo(std::ptr::null())).await;
    })
}