rust/tests/ui/async-await/issues/issue-65436-raw-ptr-not-send.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
230 B
Rust
Raw Normal View History

// edition:2018
2023-05-07 13:38:52 -05:00
// 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;
})
}