1
Fork 0

test E0133 when calling free/impl async unsafe fn in safe code

This commit is contained in:
Delan Azabani 2019-07-12 13:32:39 +10:00
parent 1574c2dee2
commit 0f66ce65db
2 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,16 @@
// edition:2018
#![feature(async_await, async_closure)]
struct S;
impl S {
async unsafe fn f() {}
}
async unsafe fn f() {}
fn main() {
S::f(); //~ ERROR call to unsafe function is unsafe
f(); //~ ERROR call to unsafe function is unsafe
}