|
| 1 | +error[E0658]: associated type defaults are unstable |
| 2 | + --> $DIR/late-bound-assoc-type.rs:8:5 |
| 3 | + | |
| 4 | +LL | type Assoc<'a> = i32; |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | + = note: see issue #29661 <https://github.com/rust-lang/rust/issues/29661> for more information |
| 8 | + = help: add `#![feature(associated_type_defaults)]` to the crate attributes to enable |
| 9 | + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date |
| 10 | + |
| 11 | +error[E0601]: `main` function not found in crate `late_bound_assoc_type` |
| 12 | + --> $DIR/late-bound-assoc-type.rs:18:2 |
| 13 | + | |
| 14 | +LL | } |
| 15 | + | ^ consider adding a `main` function to `$DIR/late-bound-assoc-type.rs` |
| 16 | + |
| 17 | +error: cannot capture late-bound type parameter in nested `impl Trait` |
| 18 | + --> $DIR/late-bound-assoc-type.rs:12:58 |
| 19 | + | |
| 20 | +LL | fn produce() -> impl for<T> Trait<(), Assoc = impl Trait<T>> { |
| 21 | + | - parameter defined here ^ |
| 22 | + |
| 23 | +error[E0107]: missing generics for associated type `Trait::Assoc` |
| 24 | + --> $DIR/late-bound-assoc-type.rs:12:39 |
| 25 | + | |
| 26 | +LL | fn produce() -> impl for<T> Trait<(), Assoc = impl Trait<T>> { |
| 27 | + | ^^^^^ expected 1 lifetime argument |
| 28 | + | |
| 29 | +note: associated type defined here, with 1 lifetime parameter: `'a` |
| 30 | + --> $DIR/late-bound-assoc-type.rs:8:10 |
| 31 | + | |
| 32 | +LL | type Assoc<'a> = i32; |
| 33 | + | ^^^^^ -- |
| 34 | +help: add missing lifetime argument |
| 35 | + | |
| 36 | +LL | fn produce() -> impl for<T> Trait<(), Assoc<'a> = impl Trait<T>> { |
| 37 | + | ++++ |
| 38 | + |
| 39 | +error[E0107]: missing generics for associated type `Trait::Assoc` |
| 40 | + --> $DIR/late-bound-assoc-type.rs:12:39 |
| 41 | + | |
| 42 | +LL | fn produce() -> impl for<T> Trait<(), Assoc = impl Trait<T>> { |
| 43 | + | ^^^^^ expected 1 lifetime argument |
| 44 | + | |
| 45 | +note: associated type defined here, with 1 lifetime parameter: `'a` |
| 46 | + --> $DIR/late-bound-assoc-type.rs:8:10 |
| 47 | + | |
| 48 | +LL | type Assoc<'a> = i32; |
| 49 | + | ^^^^^ -- |
| 50 | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 51 | +help: add missing lifetime argument |
| 52 | + | |
| 53 | +LL | fn produce() -> impl for<T> Trait<(), Assoc<'a> = impl Trait<T>> { |
| 54 | + | ++++ |
| 55 | + |
| 56 | +error[E0277]: the trait bound `{integer}: Trait<()>` is not satisfied |
| 57 | + --> $DIR/late-bound-assoc-type.rs:12:17 |
| 58 | + | |
| 59 | +LL | fn produce() -> impl for<T> Trait<(), Assoc = impl Trait<T>> { |
| 60 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait<()>` is not implemented for `{integer}` |
| 61 | +... |
| 62 | +LL | 16 |
| 63 | + | -- return type was inferred to be `{integer}` here |
| 64 | + | |
| 65 | +help: this trait has no implementations, consider adding one |
| 66 | + --> $DIR/late-bound-assoc-type.rs:7:1 |
| 67 | + | |
| 68 | +LL | trait Trait<T: ?Sized> { |
| 69 | + | ^^^^^^^^^^^^^^^^^^^^^^ |
| 70 | + |
| 71 | +error: aborting due to 6 previous errors |
| 72 | + |
| 73 | +Some errors have detailed explanations: E0107, E0277, E0601, E0658. |
| 74 | +For more information about an error, try `rustc --explain E0107`. |
0 commit comments