diff options
Diffstat (limited to 'src/test/ui/impl-trait/bound-normalization-fail.stderr')
| -rw-r--r-- | src/test/ui/impl-trait/bound-normalization-fail.stderr | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/ui/impl-trait/bound-normalization-fail.stderr b/src/test/ui/impl-trait/bound-normalization-fail.stderr index 2c4c61a0957..99c6a8cdd6d 100644 --- a/src/test/ui/impl-trait/bound-normalization-fail.stderr +++ b/src/test/ui/impl-trait/bound-normalization-fail.stderr @@ -14,6 +14,8 @@ LL | fn foo_fail<T: Trait>() -> impl FooLike<Output=T::Assoc> { | = note: expected type `()` found type `<T as impl_trait::Trait>::Assoc` + = note: consider constraining the associated type `<T as impl_trait::Trait>::Assoc` to `()` + = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html = note: the return type of a function must have a statically known size error: `impl Trait` return type cannot contain a projection or `Self` that references lifetimes from a parent scope @@ -30,6 +32,8 @@ LL | fn foo2_fail<'a, T: Trait<'a>>() -> impl FooLike<Output=T::Assoc> { | = note: expected type `()` found type `<T as lifetimes::Trait<'static>>::Assoc` + = note: consider constraining the associated type `<T as lifetimes::Trait<'static>>::Assoc` to `()` + = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html = note: the return type of a function must have a statically known size error: aborting due to 3 previous errors |
