]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/async-await/async-unsafe-fn-call-in-safe.rs
Rollup merge of #103570 - lukas-code:stabilize-ilog, r=scottmcm
[rust.git] / src / test / ui / async-await / async-unsafe-fn-call-in-safe.rs
index 2605905ff76f1989febb154bb417b939fdcaa09b..c941dc27aa307dcf2f9d4b9c1e31fd483bf83d2f 100644 (file)
@@ -11,11 +11,15 @@ impl S {
 async unsafe fn f() {}
 
 async fn g() {
-    S::f(); //~ ERROR call to unsafe function `S::f` is unsafe
-    f(); //~ ERROR call to unsafe function `f` is unsafe
+    S::f();
+    //[mir]~^ ERROR call to unsafe function is unsafe
+    //[thir]~^^ ERROR call to unsafe function `S::f` is unsafe
+    f();
+    //[mir]~^ ERROR call to unsafe function is unsafe
+    //[thir]~^^ ERROR call to unsafe function `f` is unsafe
 }
 
 fn main() {
-    S::f(); //[mir]~ ERROR call to unsafe function `S::f` is unsafe
-    f(); //[mir]~ ERROR call to unsafe function `f` is unsafe
+    S::f(); //[mir]~ ERROR call to unsafe function is unsafe
+    f(); //[mir]~ ERROR call to unsafe function is unsafe
 }