1 warning: the feature `impl_trait_in_bindings` is incomplete and may not be safe to use and/or cause compiler crashes
2 --> $DIR/bound-normalization-fail.rs:4:12
4 LL | #![feature(impl_trait_in_bindings)]
5 | ^^^^^^^^^^^^^^^^^^^^^^
7 = note: `#[warn(incomplete_features)]` on by default
8 = note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information
10 error[E0271]: type mismatch resolving `<Foo<()> as FooLike>::Output == <T as impl_trait::Trait>::Assoc`
11 --> $DIR/bound-normalization-fail.rs:27:32
13 LL | fn foo_fail<T: Trait>() -> impl FooLike<Output=T::Assoc> {
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
16 = note: expected type `()`
17 found associated type `<T as impl_trait::Trait>::Assoc`
18 help: consider constraining the associated type `<T as impl_trait::Trait>::Assoc` to `()`
20 LL | fn foo_fail<T: Trait<Assoc = ()>>() -> impl FooLike<Output=T::Assoc> {
23 error[E0760]: `impl Trait` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
24 --> $DIR/bound-normalization-fail.rs:43:41
26 LL | fn foo2_fail<'a, T: Trait<'a>>() -> impl FooLike<Output=T::Assoc> {
27 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29 error[E0271]: type mismatch resolving `<Foo<()> as FooLike>::Output == <T as lifetimes::Trait<'static>>::Assoc`
30 --> $DIR/bound-normalization-fail.rs:43:41
32 LL | fn foo2_fail<'a, T: Trait<'a>>() -> impl FooLike<Output=T::Assoc> {
33 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
35 = note: expected type `()`
36 found associated type `<T as lifetimes::Trait<'static>>::Assoc`
37 help: consider constraining the associated type `<T as lifetimes::Trait<'static>>::Assoc` to `()`
39 LL | fn foo2_fail<'a, T: Trait<'a, Assoc = ()>>() -> impl FooLike<Output=T::Assoc> {
42 error: aborting due to 3 previous errors; 1 warning emitted
44 Some errors have detailed explanations: E0271, E0760.
45 For more information about an error, try `rustc --explain E0271`.