diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-07-03 21:02:27 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2024-07-04 02:41:13 +0000 |
| commit | f63d2bc657f2158bc37c747bb0835a9d02b864d1 (patch) | |
| tree | 77896b21cbc8757c6b4b71130e0494da14b6f57f /tests/ui/const-generics/generic_const_exprs | |
| parent | 89ecae5d852a7346ee4e8240ae7a1130f1f6f458 (diff) | |
| download | rust-f63d2bc657f2158bc37c747bb0835a9d02b864d1.tar.gz rust-f63d2bc657f2158bc37c747bb0835a9d02b864d1.zip | |
Better suggestion span for missing type parameter
Diffstat (limited to 'tests/ui/const-generics/generic_const_exprs')
| -rw-r--r-- | tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr b/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr index be79450a3ce..416a9381124 100644 --- a/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr +++ b/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr @@ -20,24 +20,32 @@ error[E0393]: the type parameter `Rhs` must be explicitly specified --> $DIR/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs:16:27 | LL | ) -> impl Iterator<Item = SubAssign> { - | ^^^^^^^^^ help: set the type parameter to the desired type: `SubAssign<Rhs>` + | ^^^^^^^^^ --> $SRC_DIR/core/src/ops/arith.rs:LL:COL | = note: type parameter `Rhs` must be specified for this | = note: because of the default `Self` reference, type parameters must be specified on object types +help: set the type parameter to the desired type + | +LL | ) -> impl Iterator<Item = SubAssign<Rhs>> { + | +++++ error[E0393]: the type parameter `Rhs` must be explicitly specified --> $DIR/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs:16:27 | LL | ) -> impl Iterator<Item = SubAssign> { - | ^^^^^^^^^ help: set the type parameter to the desired type: `SubAssign<Rhs>` + | ^^^^^^^^^ --> $SRC_DIR/core/src/ops/arith.rs:LL:COL | = note: type parameter `Rhs` must be specified for this | = note: because of the default `Self` reference, type parameters must be specified on object types = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` +help: set the type parameter to the desired type + | +LL | ) -> impl Iterator<Item = SubAssign<Rhs>> { + | +++++ error[E0277]: `()` is not an iterator --> $DIR/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs:16:6 |
