]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/parser/fn-header-semantic-fail.rs
Change syntax for TyAlias where clauses
[rust.git] / src / test / ui / parser / fn-header-semantic-fail.rs
index cf5d3dab4aadad1f5b3e73b5f4b98db565906d25..91a63bafd99a9688d6847e380c863a8ee8768dca 100644 (file)
@@ -9,9 +9,8 @@ async fn ff1() {} // OK.
     unsafe fn ff2() {} // OK.
     const fn ff3() {} // OK.
     extern "C" fn ff4() {} // OK.
-    const async unsafe extern "C" fn ff5() {}
+    const async unsafe extern "C" fn ff5() {} // OK.
     //~^ ERROR functions cannot be both `const` and `async`
-    //~| ERROR cycle detected
 
     trait X {
         async fn ft1(); //~ ERROR functions in traits cannot be declared `async`
@@ -27,14 +26,15 @@ trait X {
     struct Y;
     impl X for Y {
         async fn ft1() {} //~ ERROR functions in traits cannot be declared `async`
+        //~^ ERROR method `ft1` has an incompatible type for trait
         unsafe fn ft2() {} // OK.
         const fn ft3() {} //~ ERROR functions in traits cannot be declared const
         extern "C" fn ft4() {}
         const async unsafe extern "C" fn ft5() {}
         //~^ ERROR functions in traits cannot be declared `async`
         //~| ERROR functions in traits cannot be declared const
+        //~| ERROR method `ft5` has an incompatible type for trait
         //~| ERROR functions cannot be both `const` and `async`
-        //~| ERROR cycle detected
     }
 
     impl Y {
@@ -44,7 +44,6 @@ const fn fi3() {} // OK.
         extern "C" fn fi4() {} // OK.
         const async unsafe extern "C" fn fi5() {}
         //~^ ERROR functions cannot be both `const` and `async`
-        //~| ERROR cycle detected
     }
 
     extern "C" {