]>
Commit | Line | Data |
---|---|---|
6a06907d XL |
1 | warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes |
2 | --> $DIR/constraint-assoc-type-suggestion.rs:3:12 | |
3 | | | |
4 | LL | #![feature(generic_associated_types)] | |
5 | | ^^^^^^^^^^^^^^^^^^^^^^^^ | |
6 | | | |
7 | = note: `#[warn(incomplete_features)]` on by default | |
8 | = note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information | |
9 | ||
10 | error[E0308]: mismatched types | |
11 | --> $DIR/constraint-assoc-type-suggestion.rs:13:23 | |
12 | | | |
13 | LL | let b: Vec<i32> = a; | |
14 | | -------- ^ expected struct `Vec`, found associated type | |
15 | | | | |
16 | | expected due to this | |
17 | | | |
18 | = note: expected struct `Vec<i32>` | |
19 | found associated type `<T as X>::Y<i32>` | |
20 | help: consider constraining the associated type `<T as X>::Y<i32>` to `Vec<i32>` | |
21 | | | |
22 | LL | fn f<T: X<Y<i32> = Vec<i32>>>(a: T::Y<i32>) { | |
23 | | ^^^^^^^^^^^^^^^^^^^ | |
24 | ||
25 | error: aborting due to previous error; 1 warning emitted | |
26 | ||
27 | For more information about this error, try `rustc --explain E0308`. |