blob: c78a549970d802477f2ae1f9be7c073d4180ae34 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// Test that correct syntax is used in suggestion to constrain associated type
trait X {
type Y<T>;
}
fn f<T: X>(a: T::Y<i32>) {
//~^ HELP consider constraining the associated type `<T as X>::Y<i32>` to `Vec<i32>`
//~| SUGGESTION Y<i32> = Vec<i32>>
let b: Vec<i32> = a;
//~^ ERROR mismatched types
}
fn main() {}
|