fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
252 B13 linesraw
1// run-rustfix
2
3#![allow(warnings)]
4
5fn no_restriction<'a, T: 'a>(x: &'a ()) -> &() {
6    with_restriction::<T>(x) //~ ERROR the parameter type `T` may not live long enough
7}
8
9fn with_restriction<'b, T: 'b>(x: &'b ()) -> &'b () {
10    x
11}
12
13fn main() {}