mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 11:34:11 +00:00
41 lines
458 B
Rust
41 lines
458 B
Rust
// check-pass
|
|
// compile-flags: -Znext-solver
|
|
// Issue 108933
|
|
|
|
trait Add<Rhs> {
|
|
type Sum;
|
|
}
|
|
|
|
impl Add<()> for () {
|
|
type Sum = ();
|
|
}
|
|
|
|
type Unit = <() as Add<()>>::Sum;
|
|
|
|
trait Trait<C> {
|
|
type Output;
|
|
}
|
|
|
|
fn f<T>()
|
|
where
|
|
T: Trait<()>,
|
|
<T as Trait<()>>::Output: Sized,
|
|
{
|
|
}
|
|
|
|
fn g<T>()
|
|
where
|
|
T: Trait<Unit>,
|
|
<T as Trait<()>>::Output: Sized,
|
|
{
|
|
}
|
|
|
|
fn h<T>()
|
|
where
|
|
T: Trait<()>,
|
|
<T as Trait<Unit>>::Output: Sized,
|
|
{
|
|
}
|
|
|
|
fn main() {}
|