]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/async-unsafe-fn-call-in-safe.rs
Rollup merge of #63737 - HowJMay:fix_naming, r=jonas-schievink
[rust.git] / src / test / ui / async-await / async-unsafe-fn-call-in-safe.rs
1 // edition:2018
2
3 struct S;
4
5 impl S {
6     async unsafe fn f() {}
7 }
8
9 async unsafe fn f() {}
10
11 async fn g() {
12     S::f(); //~ ERROR call to unsafe function is unsafe
13     f(); //~ ERROR call to unsafe function is unsafe
14 }
15
16 fn main() {
17     S::f(); //~ ERROR call to unsafe function is unsafe
18     f(); //~ ERROR call to unsafe function is unsafe
19 }