about summary refs log tree commit diff
path: root/tests/ui/traits/next-solver/diagnostics/projection-trait-ref.rs
blob: a3ab7bf03e55a64d3f22ab56ed8a682535cafcbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//@ compile-flags: -Znext-solver

trait Trait {
    type Assoc;
}

fn test_poly<T>() {
    let x: <T as Trait>::Assoc = ();
    //~^ ERROR the trait bound `T: Trait` is not satisfied
}

fn test() {
    let x: <i32 as Trait>::Assoc = ();
    //~^ ERROR the trait bound `i32: Trait` is not satisfied
}

fn main() {}