]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/static-outlives-a-where-clause.rs
Rollup merge of #104672 - Voultapher:unify-sort-modules, r=thomcc
[rust.git] / tests / ui / traits / static-outlives-a-where-clause.rs
1 // run-pass
2
3 trait Foo<'a> {
4     fn xyz(self);
5 }
6 impl<'a, T> Foo<'a> for T where 'static: 'a {
7     fn xyz(self) {}
8 }
9
10 trait Bar {
11     fn uvw(self);
12 }
13 impl<T> Bar for T where for<'a> T: Foo<'a> {
14     fn uvw(self) { self.xyz(); }
15 }
16
17 fn foo<T>(t: T) where T: Bar {
18     t.uvw();
19 }
20
21 fn main() {
22     foo(0);
23 }