2 //[nll] compile-flags:-Zborrowck=mir
4 fn static_id<'a,'b>(t: &'a ()) -> &'static ()
5 where 'a: 'static { t }
6 fn static_id_indirect<'a,'b>(t: &'a ()) -> &'static ()
7 where 'a: 'b, 'b: 'static { t }
8 fn static_id_wrong_way<'a>(t: &'a ()) -> &'static () where 'static: 'a {
10 //[nll]~^ ERROR unsatisfied lifetime constraints
13 fn error(u: &(), v: &()) {
14 static_id(&u); //[ll]~ ERROR explicit lifetime required in the type of `u` [E0621]
15 //[nll]~^ ERROR explicit lifetime required in the type of `u` [E0621]
16 static_id_indirect(&v); //[ll]~ ERROR explicit lifetime required in the type of `v` [E0621]
17 //[nll]~^ ERROR explicit lifetime required in the type of `v` [E0621]