about summary refs log tree commit diff
path: root/tests/ui/traits/next-solver/well-formed-in-relate.rs
blob: eec1ddef228c49abac0eef8e6794152ea7d2276f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
fn main() {
    let x;
    //~^ ERROR type annotations needed for `Map<_, _>`
    higher_ranked();
    x = unconstrained_map();
}

fn higher_ranked() where for<'a> &'a (): Sized {}

struct Map<T, U> where T: Fn() -> U {
    t: T,
}

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

fn unconstrained_map<T: Fn() -> U, U>() -> <Map<T, U> as Mirror>::Assoc { todo!() }