1 error[E0311]: the parameter type `T` may not live long enough
2 --> $DIR/suggest-introducing-and-adding-missing-lifetime.rs:2:5
4 LL | with_restriction::<T>(x)
5 | ^^^^^^^^^^^^^^^^^^^^^
7 note: the parameter type `T` must be valid for the anonymous lifetime defined here...
8 --> $DIR/suggest-introducing-and-adding-missing-lifetime.rs:1:25
10 LL | fn no_restriction<T>(x: &()) -> &() {
12 note: ...so that the type `T` will meet its required lifetime bounds
13 --> $DIR/suggest-introducing-and-adding-missing-lifetime.rs:2:5
15 LL | with_restriction::<T>(x)
16 | ^^^^^^^^^^^^^^^^^^^^^
17 help: consider adding an explicit lifetime bound...
19 LL | fn no_restriction<'a, T: 'a>(x: &()) -> &() {
22 error: aborting due to previous error