fork/rust
git clone https://git.julia.blue/fork/rust
73528e339aa
1.40.0
1error: lifetime may not live long enough 2 --> $DIR/regions-free-region-ordering-callee.rs:13:5 3 | 4LL | fn ordering2<'a, 'b>(x: &'a &'b usize, y: &'a usize) -> &'b usize { 5 | -- -- lifetime `'b` defined here 6 | | 7 | lifetime `'a` defined here 8LL | // However, it is not safe to assume that 'b <= 'a 9LL | &*y 10 | ^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a` 11 12error: lifetime may not live long enough 13 --> $DIR/regions-free-region-ordering-callee.rs:18:12 14 | 15LL | fn ordering3<'a, 'b>(x: &'a usize, y: &'b usize) -> &'a &'b usize { 16 | -- -- lifetime `'b` defined here 17 | | 18 | lifetime `'a` defined here 19LL | // Do not infer an ordering from the return value. 20LL | let z: &'b usize = &*x; 21 | ^^^^^^^^^ type annotation requires that `'a` must outlive `'b` 22 23error: aborting due to 2 previous errors 24