error: functions cannot be both `const` and `async` --> $DIR/fn-header-semantic-fail.rs:12:5 | LL | const async unsafe extern "C" fn ff5() {} // OK. | ^^^^^-^^^^^------------------------------ | | | | | `async` because of this | `const` because of this error[E0706]: functions in traits cannot be declared `async` --> $DIR/fn-header-semantic-fail.rs:16:9 | LL | async fn ft1(); | -----^^^^^^^^^^ | | | `async` because of this | = note: `async` trait functions are not currently supported = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait error[E0379]: functions in traits cannot be declared const --> $DIR/fn-header-semantic-fail.rs:18:9 | LL | const fn ft3(); | ^^^^^ functions in traits cannot be const error[E0379]: functions in traits cannot be declared const --> $DIR/fn-header-semantic-fail.rs:20:9 | LL | const async unsafe extern "C" fn ft5(); | ^^^^^ functions in traits cannot be const error[E0706]: functions in traits cannot be declared `async` --> $DIR/fn-header-semantic-fail.rs:20:9 | LL | const async unsafe extern "C" fn ft5(); | ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | `async` because of this | = note: `async` trait functions are not currently supported = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait error: functions cannot be both `const` and `async` --> $DIR/fn-header-semantic-fail.rs:20:9 | LL | const async unsafe extern "C" fn ft5(); | ^^^^^-^^^^^---------------------------- | | | | | `async` because of this | `const` because of this error[E0706]: functions in traits cannot be declared `async` --> $DIR/fn-header-semantic-fail.rs:28:9 | LL | async fn ft1() {} | -----^^^^^^^^^^^^ | | | `async` because of this | = note: `async` trait functions are not currently supported = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait error[E0379]: functions in traits cannot be declared const --> $DIR/fn-header-semantic-fail.rs:31:9 | LL | const fn ft3() {} | ^^^^^ functions in traits cannot be const error[E0379]: functions in traits cannot be declared const --> $DIR/fn-header-semantic-fail.rs:33:9 | LL | const async unsafe extern "C" fn ft5() {} | ^^^^^ functions in traits cannot be const error[E0706]: functions in traits cannot be declared `async` --> $DIR/fn-header-semantic-fail.rs:33:9 | LL | const async unsafe extern "C" fn ft5() {} | ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | `async` because of this | = note: `async` trait functions are not currently supported = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait error: functions cannot be both `const` and `async` --> $DIR/fn-header-semantic-fail.rs:33:9 | LL | const async unsafe extern "C" fn ft5() {} | ^^^^^-^^^^^------------------------------ | | | | | `async` because of this | `const` because of this error: functions cannot be both `const` and `async` --> $DIR/fn-header-semantic-fail.rs:45:9 | LL | const async unsafe extern "C" fn fi5() {} | ^^^^^-^^^^^------------------------------ | | | | | `async` because of this | `const` because of this error: functions in `extern` blocks cannot have qualifiers --> $DIR/fn-header-semantic-fail.rs:50:18 | LL | extern "C" { | ---------- in this `extern` block LL | async fn fe1(); | ^^^ | help: remove the qualifiers | LL | fn fe1(); | ~~ error: functions in `extern` blocks cannot have qualifiers --> $DIR/fn-header-semantic-fail.rs:51:19 | LL | extern "C" { | ---------- in this `extern` block LL | async fn fe1(); LL | unsafe fn fe2(); | ^^^ | help: remove the qualifiers | LL | fn fe2(); | ~~ error: functions in `extern` blocks cannot have qualifiers --> $DIR/fn-header-semantic-fail.rs:52:18 | LL | extern "C" { | ---------- in this `extern` block ... LL | const fn fe3(); | ^^^ | help: remove the qualifiers | LL | fn fe3(); | ~~ error: functions in `extern` blocks cannot have qualifiers --> $DIR/fn-header-semantic-fail.rs:53:23 | LL | extern "C" { | ---------- in this `extern` block ... LL | extern "C" fn fe4(); | ^^^ | help: remove the qualifiers | LL | fn fe4(); | ~~ error: functions in `extern` blocks cannot have qualifiers --> $DIR/fn-header-semantic-fail.rs:54:42 | LL | extern "C" { | ---------- in this `extern` block ... LL | const async unsafe extern "C" fn fe5(); | ^^^ | help: remove the qualifiers | LL | fn fe5(); | ~~ error: functions cannot be both `const` and `async` --> $DIR/fn-header-semantic-fail.rs:54:9 | LL | const async unsafe extern "C" fn fe5(); | ^^^^^-^^^^^---------------------------- | | | | | `async` because of this | `const` because of this error[E0053]: method `ft1` has an incompatible type for trait --> $DIR/fn-header-semantic-fail.rs:28:24 | LL | async fn ft1() {} | ^ | | | checked the `Output` of this `async fn`, found opaque type | expected `()`, found opaque type | = note: while checking the return type of the `async fn` note: type in trait --> $DIR/fn-header-semantic-fail.rs:16:23 | LL | async fn ft1(); | ^ = note: expected fn pointer `fn()` found fn pointer `fn() -> impl Future` error[E0053]: method `ft5` has an incompatible type for trait --> $DIR/fn-header-semantic-fail.rs:33:48 | LL | const async unsafe extern "C" fn ft5() {} | ^ | | | checked the `Output` of this `async fn`, found opaque type | expected `()`, found opaque type | = note: while checking the return type of the `async fn` note: type in trait --> $DIR/fn-header-semantic-fail.rs:20:47 | LL | const async unsafe extern "C" fn ft5(); | ^ = note: expected fn pointer `unsafe extern "C" fn()` found fn pointer `unsafe extern "C" fn() -> impl Future` error: aborting due to 20 previous errors Some errors have detailed explanations: E0053, E0379, E0706. For more information about an error, try `rustc --explain E0053`.