1 // Check that explicit region bounds are allowed on the various
2 // nominal types (but not on other types) and that they are type
5 struct Inv<'a> { // invariant w/r/t 'a
10 fn method<'y:'x>(self, y: Inv<'y>);
13 fn caller1<'a,'b,F:Foo<'a>>(a: Inv<'a>, b: Inv<'b>, f: F) {
14 // Here the value provided for 'y is 'a, and hence 'a:'a holds.
18 fn caller2<'a,'b,F:Foo<'a>>(a: Inv<'a>, b: Inv<'b>, f: F) {
19 // Here the value provided for 'y is 'b, and hence 'b:'a does not hold.
21 //~^ ERROR lifetime may not live long enough
24 fn caller3<'a,'b:'a,F:Foo<'a>>(a: Inv<'a>, b: Inv<'b>, f: F) {
25 // Here the value provided for 'y is 'b, and hence 'b:'a holds.