diff options
| author | Esteban Kuber <esteban@kuber.com.ar> | 2021-12-11 02:20:41 +0000 |
|---|---|---|
| committer | Esteban Kuber <esteban@kuber.com.ar> | 2021-12-11 02:32:15 +0000 |
| commit | 5e1972eba7e95e68f6fc05b07dec15fb1e553e1b (patch) | |
| tree | fd01764b7ebb5b4c0f952c4fbce21d2a48b1d0e1 /src/test/ui/parser | |
| parent | f0448f44bcda55fd9eb71da82495ef648eedb4e4 (diff) | |
| download | rust-5e1972eba7e95e68f6fc05b07dec15fb1e553e1b.tar.gz rust-5e1972eba7e95e68f6fc05b07dec15fb1e553e1b.zip | |
Tweak assoc type obligation spans
* Point at RHS of associated type in obligation span * Point at `impl` assoc type on projection error * Reduce verbosity of recursive obligations * Point at source of binding lifetime obligation * Tweak "required bound" note * Tweak "expected... found opaque (return) type" labels * Point at set type in impl assoc type WF errors
Diffstat (limited to 'src/test/ui/parser')
| -rw-r--r-- | src/test/ui/parser/fn-header-semantic-fail.stderr | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/test/ui/parser/fn-header-semantic-fail.stderr b/src/test/ui/parser/fn-header-semantic-fail.stderr index 75c60a0ea2a..8eaba559a62 100644 --- a/src/test/ui/parser/fn-header-semantic-fail.stderr +++ b/src/test/ui/parser/fn-header-semantic-fail.stderr @@ -183,9 +183,6 @@ LL | const async unsafe extern "C" fn fe5(); error[E0053]: method `ft1` has an incompatible type for trait --> $DIR/fn-header-semantic-fail.rs:28:24 | -LL | async fn ft1(); - | - type in trait -... LL | async fn ft1() {} | ^ | | @@ -193,15 +190,17 @@ LL | async fn ft1() {} | 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<Output = ()>` 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(); - | - type in trait -... LL | const async unsafe extern "C" fn ft5() {} | ^ | | @@ -209,6 +208,11 @@ LL | const async unsafe extern "C" fn ft5() {} | 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<Output = ()>` |
