1 warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
2 --> $DIR/bound-normalization-fail.rs:4:12
4 LL | #![feature(impl_trait_in_bindings)]
5 | ^^^^^^^^^^^^^^^^^^^^^^
7 = note: `#[warn(incomplete_features)]` on by default
9 error[E0271]: type mismatch resolving `<Foo<()> as FooLike>::Output == <T as impl_trait::Trait>::Assoc`
10 --> $DIR/bound-normalization-fail.rs:27:32
12 LL | fn foo_fail<T: Trait>() -> impl FooLike<Output=T::Assoc> {
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
15 = note: expected type `()`
16 found associated type `<T as impl_trait::Trait>::Assoc`
17 = note: consider constraining the associated type `<T as impl_trait::Trait>::Assoc` to `()`
18 = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
19 = note: the return type of a function must have a statically known size
21 error: `impl Trait` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
22 --> $DIR/bound-normalization-fail.rs:43:41
24 LL | fn foo2_fail<'a, T: Trait<'a>>() -> impl FooLike<Output=T::Assoc> {
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27 error[E0271]: type mismatch resolving `<Foo<()> as FooLike>::Output == <T as lifetimes::Trait<'static>>::Assoc`
28 --> $DIR/bound-normalization-fail.rs:43:41
30 LL | fn foo2_fail<'a, T: Trait<'a>>() -> impl FooLike<Output=T::Assoc> {
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
33 = note: expected type `()`
34 found associated type `<T as lifetimes::Trait<'static>>::Assoc`
35 = note: consider constraining the associated type `<T as lifetimes::Trait<'static>>::Assoc` to `()`
36 = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
37 = note: the return type of a function must have a statically known size
39 error: aborting due to 3 previous errors
41 For more information about this error, try `rustc --explain E0271`.