]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/constraint-assoc-type-suggestion.rs
Merge commit '0eff589afc83e21a03a168497bbab6b4dfbb4ef6' into clippyup
[rust.git] / src / test / ui / generic-associated-types / constraint-assoc-type-suggestion.rs
1 // Test that correct syntax is used in suggestion to constrain associated type
2
3 #![feature(generic_associated_types)]
4
5 trait X {
6     type Y<T>;
7 }
8
9 fn f<T: X>(a: T::Y<i32>) {
10     //~^ HELP consider constraining the associated type `<T as X>::Y<i32>` to `Vec<i32>`
11     //~| SUGGESTION Y<i32> = Vec<i32>>
12     let b: Vec<i32> = a;
13     //~^ ERROR mismatched types
14 }
15
16 fn main() {}