X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftest%2Fui%2Fparser%2Ffn-header-semantic-fail.stderr;h=bc51ba8b8c5c51971799f77b3dea857c71f7243d;hb=9e197b75f0e5ad17dc1bb1431853bd4df7cff408;hp=75d27c614e2028192f063c6179f8bae2b956001d;hpb=4118ad24d6c41cca330dc3f9e8f218690944d0ff;p=rust.git diff --git a/src/test/ui/parser/fn-header-semantic-fail.stderr b/src/test/ui/parser/fn-header-semantic-fail.stderr index 75d27c614e2..bc51ba8b8c5 100644 --- a/src/test/ui/parser/fn-header-semantic-fail.stderr +++ b/src/test/ui/parser/fn-header-semantic-fail.stderr @@ -216,23 +216,41 @@ LL | | } LL | | } | |_^ -error[E0276]: impl has stricter requirements than trait - --> $DIR/fn-header-semantic-fail.rs:29:9 +error[E0053]: method `ft1` has an incompatible type for trait + --> $DIR/fn-header-semantic-fail.rs:29:24 | -LL | async fn ft1(); - | --------------- definition of `ft1` from trait -... LL | async fn ft1() {} - | ^^^^^^^^^^^^^^ impl has extra requirement `(): Future` + | ^ + | | + | 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:17:23 + | +LL | async fn ft1(); + | ^ + = note: expected fn pointer `fn()` + found fn pointer `fn() -> impl Future` -error[E0276]: impl has stricter requirements than trait - --> $DIR/fn-header-semantic-fail.rs:34:9 +error[E0053]: method `ft5` has an incompatible type for trait + --> $DIR/fn-header-semantic-fail.rs:34:48 | -LL | const async unsafe extern "C" fn ft5(); - | --------------------------------------- definition of `ft5` from trait -... LL | const async unsafe extern "C" fn ft5() {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `(): Future` + | ^ + | | + | 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:21: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[E0391]: cycle detected when computing type of `main::::ft5::{opaque#0}` --> $DIR/fn-header-semantic-fail.rs:34:48 @@ -308,5 +326,5 @@ LL | | } error: aborting due to 23 previous errors -Some errors have detailed explanations: E0276, E0379, E0391, E0706. -For more information about an error, try `rustc --explain E0276`. +Some errors have detailed explanations: E0053, E0379, E0391, E0706. +For more information about an error, try `rustc --explain E0053`.