]> git.lizzy.rs Git - rust.git/blob - tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.fixed
add tests for 107090
[rust.git] / tests / ui / lifetimes / suggest-introducing-and-adding-missing-lifetime.fixed
1 // run-rustfix
2
3 #![allow(warnings)]
4
5 fn no_restriction<'a, T: 'a>(x: &'a ()) -> &() {
6     with_restriction::<T>(x) //~ ERROR the parameter type `T` may not live long enough
7 }
8
9 fn with_restriction<'b, T: 'b>(x: &'b ()) -> &'b () {
10     x
11 }
12
13 fn main() {}