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

trait Mirror {
    type Assoc;
}
impl<T> Mirror for T {
    type Assoc = T;
}

fn arg() -> &'static [i32; 1] { todo!() }

fn arg_error(x: <fn() as Mirror>::Assoc, y: ()) { todo!() }

fn main() {
    // Should suggest to reverse the args...
    // but if we don't normalize the expected, then we don't.
    arg_error((), || ());
    //~^ ERROR arguments to this function are incorrect
}