summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/new-solver/normalize-param-env-3.rs
blob: ce2974b2a16f4ef06ef2a95969e3c015849170f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// check-pass
// compile-flags: -Ztrait-solver=next
// Issue 100177

trait GenericTrait<T> {}

trait Channel<I>: GenericTrait<Self::T> {
    type T;
}

trait Sender {
    type Msg;

    fn send<C>()
    where
        C: Channel<Self::Msg>;
}

impl<T> Sender for T {
    type Msg = ();

    fn send<C>()
    where
        C: Channel<Self::Msg>,
    {
    }
}

// This works
fn foo<I, C>(ch: C) where C: Channel<I> {}

fn main() {}