summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/new-solver/lazy-nested-obligations-2.rs
blob: fd91d81cdf0d7737b269b9829191565a3d84993d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// compile-flags: -Ztrait-solver=next
// known-bug: #95863

pub trait With {
    type F;
}

impl With for i32 {
    type F = fn(&str);
}

fn f(_: &str) {}

fn main() {
    let _: V<i32> = V(f);
    pub struct V<T: With>(<T as With>::F);

    pub enum E3<T: With> {
        Var(<T as With>::F),
    }
    let _: E3<i32> = E3::Var(f);
}