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