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`
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 {
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" {