1 // Check that explicit region bounds are allowed on the various
2 // nominal types (but not on other types) and that they are type
6 // ignore-compare-mode-nll
7 //[nll] compile-flags: -Z borrowck=mir
9 struct TupleStruct<'a>(&'a isize);
10 struct Struct<'a> { x:&'a isize }
12 fn a_fn1<'a,'b>(e: TupleStruct<'a>) -> TupleStruct<'b> {
14 //[base]~^ ERROR mismatched types
15 //[nll]~^^ ERROR lifetime may not live long enough
18 fn a_fn3<'a,'b>(e: Struct<'a>) -> Struct<'b> {
20 //[base]~^ ERROR mismatched types
21 //[nll]~^^ ERROR lifetime may not live long enough