rust/tests/ui/traits/new-solver/normalize-param-env-3.rs
2023-03-11 23:16:46 +00:00

33 lines
430 B
Rust

// 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() {}