1 error[E0271]: type mismatch resolving `<impl Bar as Foo>::Item == i32`
2 --> $DIR/impl-trait-return-missing-constraint.rs:25:13
4 LL | fn bar() -> impl Bar {
5 | -------- the found opaque type
7 LL | fn baz() -> impl Bar<Item = i32> {
8 | ^^^^^^^^^^^^^^^^^^^^ expected `i32`, found associated type
10 = note: expected type `i32`
11 found associated type `<impl Bar as Foo>::Item`
12 help: consider constraining the associated type `<impl Bar as Foo>::Item` to `i32`
14 LL | fn bar() -> impl Bar<Item = i32> {
17 error: aborting due to previous error
19 For more information about this error, try `rustc --explain E0271`.