3 #![allow(unused_variables)]
4 // Test what happens when a HR obligation is applied to an impl with
5 // "outlives" bounds. Currently we're pretty conservative here; this
6 // will probably improve in time.
9 fn foo(&self, x: X) { }
13 where T : for<'a> Foo<&'a isize>
17 // Expressed as a where clause
19 struct SomeStruct<X> {
23 impl<'a,X> Foo<&'a isize> for SomeStruct<X>
29 want_foo::<SomeStruct<usize>>();
32 // Expressed as shorthand
34 struct AnotherStruct<X> {
38 impl<'a,X:'a> Foo<&'a isize> for AnotherStruct<X>
43 want_foo::<AnotherStruct<usize>>();