2019-07-12 13:32:39 +10:00
|
|
|
// edition:2018
|
|
|
|
|
|
|
|
struct S;
|
|
|
|
|
|
|
|
impl S {
|
|
|
|
async unsafe fn f() {}
|
|
|
|
}
|
|
|
|
|
|
|
|
async unsafe fn f() {}
|
|
|
|
|
2019-07-12 14:43:52 +10:00
|
|
|
async fn g() {
|
|
|
|
S::f(); //~ ERROR call to unsafe function is unsafe
|
|
|
|
f(); //~ ERROR call to unsafe function is unsafe
|
|
|
|
}
|
|
|
|
|
2019-07-12 13:32:39 +10:00
|
|
|
fn main() {
|
|
|
|
S::f(); //~ ERROR call to unsafe function is unsafe
|
|
|
|
f(); //~ ERROR call to unsafe function is unsafe
|
|
|
|
}
|