]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.rs
Rollup merge of #105555 - krasimirgg:llvm-int-opt-2, r=cuviper
[rust.git] / src / test / ui / lifetimes / suggest-introducing-and-adding-missing-lifetime.rs
1 fn no_restriction<T>(x: &()) -> &() {
2     with_restriction::<T>(x) //~ ERROR the parameter type `T` may not live long enough
3 }
4
5 fn with_restriction<'b, T: 'b>(x: &'b ()) -> &'b () {
6     x
7 }
8
9 fn main() {}