blob: 976054facee5e997595e90a6dba16692e0cb7641 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// check-pass
// Another minimized regression test for #112832.
trait Trait {
type Assoc;
}
trait Sub<'a>: Trait<Assoc = <Self as Sub<'a>>::SubAssoc> {
type SubAssoc;
}
// By using the where-clause we normalize `<T as Trait>::Assoc` to
// `<T as Sub<'a>>::SubAssoc` where `'a` is an unconstrained region
// variable.
fn foo<T>(x: <T as Trait>::Assoc)
where
for<'a> T: Sub<'a>,
{}
fn main() {}
|