mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
33 lines
426 B
Rust
33 lines
426 B
Rust
//@ check-pass
|
|
//@ 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() {}
|