]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/bound-normalization-fail.stderr
Auto merge of #62542 - Centril:rollup-5mpb8tu, r=Centril
[rust.git] / src / test / ui / impl-trait / bound-normalization-fail.stderr
1 warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
2   --> $DIR/bound-normalization-fail.rs:6:12
3    |
4 LL | #![feature(impl_trait_in_bindings)]
5    |            ^^^^^^^^^^^^^^^^^^^^^^
6
7 error[E0271]: type mismatch resolving `<Foo<()> as FooLike>::Output == <T as impl_trait::Trait>::Assoc`
8   --> $DIR/bound-normalization-fail.rs:30:32
9    |
10 LL |     fn foo_fail<T: Trait>() -> impl FooLike<Output=T::Assoc> {
11    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found associated type
12    |
13    = note: expected type `()`
14               found type `<T as impl_trait::Trait>::Assoc`
15    = note: the return type of a function must have a statically known size
16
17 error[E0271]: type mismatch resolving `<Foo<()> as FooLike>::Output == <T as lifetimes::Trait<'static>>::Assoc`
18   --> $DIR/bound-normalization-fail.rs:47:41
19    |
20 LL |     fn foo2_fail<'a, T: Trait<'a>>() -> impl FooLike<Output=T::Assoc> {
21    |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found associated type
22    |
23    = note: expected type `()`
24               found type `<T as lifetimes::Trait<'static>>::Assoc`
25    = note: the return type of a function must have a statically known size
26
27 error: aborting due to 2 previous errors
28
29 For more information about this error, try `rustc --explain E0271`.