1 error[E0311]: the parameter type `T` may not live long enough
4 LL | with_restriction::<T>(x)
5 | ^^^^^^^^^^^^^^^^^^^^^
7 note: the parameter type `T` must be valid for the anonymous lifetime defined here...
10 LL | fn no_restriction<T>(x: &()) -> &() {
12 note: ...so that the type `T` will meet its required lifetime bounds
15 LL | with_restriction::<T>(x)
16 | ^^^^^^^^^^^^^^^^^^^^^
17 help: consider adding an explicit lifetime bound...
19 LL | fn no_restriction<T: 'a>(x: &()) -> &() {
22 error: aborting due to previous error
24 For more information about this error, try `rustc --explain E0311`.