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`
7 note: expected this to be `()`
8 --> $DIR/bound-normalization-fail.rs:14:19
12 = note: expected unit type `()`
13 found associated type `<T as impl_trait::Trait>::Assoc`
14 help: consider constraining the associated type `<T as impl_trait::Trait>::Assoc` to `()`
16 LL | fn foo_fail<T: Trait<Assoc = ()>>() -> impl FooLike<Output = T::Assoc> {
19 error[E0271]: type mismatch resolving `<Foo<()> as FooLike>::Output == <T as impl_trait::Trait>::Assoc`
20 --> $DIR/bound-normalization-fail.rs:25:64
22 LL | fn foo_fail<T: Trait>() -> impl FooLike<Output = T::Assoc> {
23 | ________________________________________________________________^
28 | |_____^ type mismatch resolving `<Foo<()> as FooLike>::Output == <T as impl_trait::Trait>::Assoc`
30 note: expected this to be `()`
31 --> $DIR/bound-normalization-fail.rs:14:19
35 = note: expected unit type `()`
36 found associated type `<T as impl_trait::Trait>::Assoc`
37 help: consider constraining the associated type `<T as impl_trait::Trait>::Assoc` to `()`
39 LL | fn foo_fail<T: Trait<Assoc = ()>>() -> impl FooLike<Output = T::Assoc> {
42 error[E0760]: `impl Trait` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
43 --> $DIR/bound-normalization-fail.rs:42:41
45 LL | fn foo2_fail<'a, T: Trait<'a>>() -> impl FooLike<Output = T::Assoc> {
46 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48 error[E0271]: type mismatch resolving `<Foo<()> as FooLike>::Output == <T as lifetimes::Trait<'static>>::Assoc`
49 --> $DIR/bound-normalization-fail.rs:42:41
51 LL | fn foo2_fail<'a, T: Trait<'a>>() -> impl FooLike<Output = T::Assoc> {
52 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch resolving `<Foo<()> as FooLike>::Output == <T as lifetimes::Trait<'static>>::Assoc`
54 note: expected this to be `()`
55 --> $DIR/bound-normalization-fail.rs:14:19
59 = note: expected unit type `()`
60 found associated type `<T as lifetimes::Trait<'static>>::Assoc`
61 help: consider constraining the associated type `<T as lifetimes::Trait<'static>>::Assoc` to `()`
63 LL | fn foo2_fail<'a, T: Trait<'a, Assoc = ()>>() -> impl FooLike<Output = T::Assoc> {
66 error[E0271]: type mismatch resolving `<Foo<()> as FooLike>::Output == <T as lifetimes::Trait<'static>>::Assoc`
67 --> $DIR/bound-normalization-fail.rs:42:73
69 LL | fn foo2_fail<'a, T: Trait<'a>>() -> impl FooLike<Output = T::Assoc> {
70 | _________________________________________________________________________^
76 | |_____^ type mismatch resolving `<Foo<()> as FooLike>::Output == <T as lifetimes::Trait<'static>>::Assoc`
78 note: expected this to be `()`
79 --> $DIR/bound-normalization-fail.rs:14:19
83 = note: expected unit type `()`
84 found associated type `<T as lifetimes::Trait<'static>>::Assoc`
85 help: consider constraining the associated type `<T as lifetimes::Trait<'static>>::Assoc` to `()`
87 LL | fn foo2_fail<'a, T: Trait<'a, Assoc = ()>>() -> impl FooLike<Output = T::Assoc> {
90 error: aborting due to 5 previous errors
92 Some errors have detailed explanations: E0271, E0760.
93 For more information about an error, try `rustc --explain E0271`.