1 error[E0271]: type mismatch resolving `<Foo<()> as FooLike>::Output == <T as impl_trait::Trait>::Assoc`
2 --> $DIR/bound-normalization-fail.rs:25:32
4 LL | fn foo_fail<T: Trait>() -> impl FooLike<Output = T::Assoc> {
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch resolving `<Foo<()> as FooLike>::Output == <T as impl_trait::Trait>::Assoc`
8 | ------- return type was inferred to be `Foo<()>` here
10 note: expected this to be `()`
11 --> $DIR/bound-normalization-fail.rs:14:19
15 = note: expected unit type `()`
16 found associated type `<T as impl_trait::Trait>::Assoc`
17 help: consider constraining the associated type `<T as impl_trait::Trait>::Assoc` to `()`
19 LL | fn foo_fail<T: Trait<Assoc = ()>>() -> impl FooLike<Output = T::Assoc> {
22 error[E0760]: `impl Trait` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
23 --> $DIR/bound-normalization-fail.rs:41:41
25 LL | fn foo2_fail<'a, T: Trait<'a>>() -> impl FooLike<Output = T::Assoc> {
26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28 error[E0271]: type mismatch resolving `<Foo<()> as FooLike>::Output == <T as lifetimes::Trait<'static>>::Assoc`
29 --> $DIR/bound-normalization-fail.rs:41:41
31 LL | fn foo2_fail<'a, T: Trait<'a>>() -> impl FooLike<Output = T::Assoc> {
32 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch resolving `<Foo<()> as FooLike>::Output == <T as lifetimes::Trait<'static>>::Assoc`
35 | ------- return type was inferred to be `Foo<()>` here
37 note: expected this to be `()`
38 --> $DIR/bound-normalization-fail.rs:14:19
42 = note: expected unit type `()`
43 found associated type `<T as lifetimes::Trait<'static>>::Assoc`
44 help: consider constraining the associated type `<T as lifetimes::Trait<'static>>::Assoc` to `()`
46 LL | fn foo2_fail<'a, T: Trait<'a, Assoc = ()>>() -> impl FooLike<Output = T::Assoc> {
49 error: aborting due to 3 previous errors
51 Some errors have detailed explanations: E0271, E0760.
52 For more information about an error, try `rustc --explain E0271`.