blob: 15b67d9ab68e7710587e45d9db9ef1bf4577cc91 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
//@ check-pass
// Make sure that we still deduce outlives bounds from supertrait projections
// and require them for well-formedness.
trait Trait {
type Assoc;
}
trait Bar {
type Assoc;
}
trait Foo<'a, T: 'a>: Bar<Assoc = &'a T> {
}
fn outlives<'a, T: 'a>() {}
fn implied_outlives<'a, T: Trait>(x: &dyn Foo<'a, T::Assoc>) {
outlives::<'a, T::Assoc>();
}
fn main() {}
|