|
| 1 | +error[E0412]: cannot find type `F` in this scope |
| 2 | + --> $DIR/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs:11:17 |
| 3 | + | |
| 4 | +LL | let f: F = async { 1 }; |
| 5 | + | ^ |
| 6 | + --> $SRC_DIR/core/src/ops/function.rs:LL:COL |
| 7 | + | |
| 8 | + = note: similarly named trait `Fn` defined here |
| 9 | + | |
| 10 | +help: a trait with a similar name exists |
| 11 | + | |
| 12 | +LL | let f: Fn = async { 1 }; |
| 13 | + | ~~ |
| 14 | +help: you might be missing a type parameter |
| 15 | + | |
| 16 | +LL | fn f<T, F>( |
| 17 | + | +++ |
| 18 | + |
| 19 | +error[E0393]: the type parameter `Rhs` must be explicitly specified |
| 20 | + --> $DIR/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs:16:27 |
| 21 | + | |
| 22 | +LL | ) -> impl Iterator<Item = SubAssign> { |
| 23 | + | ^^^^^^^^^ help: set the type parameter to the desired type: `SubAssign<Rhs>` |
| 24 | + --> $SRC_DIR/core/src/ops/arith.rs:LL:COL |
| 25 | + | |
| 26 | + = note: type parameter `Rhs` must be specified for this |
| 27 | + | |
| 28 | + = note: because of the default `Self` reference, type parameters must be specified on object types |
| 29 | + |
| 30 | +error[E0393]: the type parameter `Rhs` must be explicitly specified |
| 31 | + --> $DIR/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs:16:27 |
| 32 | + | |
| 33 | +LL | ) -> impl Iterator<Item = SubAssign> { |
| 34 | + | ^^^^^^^^^ help: set the type parameter to the desired type: `SubAssign<Rhs>` |
| 35 | + --> $SRC_DIR/core/src/ops/arith.rs:LL:COL |
| 36 | + | |
| 37 | + = note: type parameter `Rhs` must be specified for this |
| 38 | + | |
| 39 | + = note: because of the default `Self` reference, type parameters must be specified on object types |
| 40 | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 41 | + |
| 42 | +error[E0277]: `()` is not an iterator |
| 43 | + --> $DIR/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs:16:6 |
| 44 | + | |
| 45 | +LL | ) -> impl Iterator<Item = SubAssign> { |
| 46 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `()` is not an iterator |
| 47 | + | |
| 48 | + = help: the trait `Iterator` is not implemented for `()` |
| 49 | + |
| 50 | +error[E0782]: trait objects must include the `dyn` keyword |
| 51 | + --> $DIR/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs:16:27 |
| 52 | + | |
| 53 | +LL | ) -> impl Iterator<Item = SubAssign> { |
| 54 | + | ^^^^^^^^^ |
| 55 | + | |
| 56 | +help: add `dyn` keyword before this trait |
| 57 | + | |
| 58 | +LL | ) -> impl Iterator<Item = dyn SubAssign> { |
| 59 | + | +++ |
| 60 | +help: you might have meant to write a bound here |
| 61 | + | |
| 62 | +LL | ) -> impl Iterator<Item: SubAssign> { |
| 63 | + | ~ |
| 64 | + |
| 65 | +error: aborting due to 5 previous errors |
| 66 | + |
| 67 | +Some errors have detailed explanations: E0277, E0393, E0412, E0782. |
| 68 | +For more information about an error, try `rustc --explain E0277`. |
0 commit comments