rust/tests/ui/traits/next-solver/normalize/normalize-param-env-3.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
426 B
Rust
Raw Normal View History

//@ check-pass
2023-12-14 13:11:28 +01:00
//@ compile-flags: -Znext-solver
// 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() {}