fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
1.4 KiB39 linesraw
1error: lifetime may not live long enough
2  --> $DIR/regions-free-region-ordering-caller.rs:11:12
3   |
4LL | fn call2<'a, 'b>(a: &'a usize, b: &'b usize) {
5   |          --  -- lifetime `'b` defined here
6   |          |
7   |          lifetime `'a` defined here
8LL |     let z: Option<&'b &'a usize> = None;
9   |            ^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'b`
10   |
11   = help: consider adding the following bound: `'a: 'b`
12
13error: lifetime may not live long enough
14  --> $DIR/regions-free-region-ordering-caller.rs:17:12
15   |
16LL | fn call3<'a, 'b>(a: &'a usize, b: &'b usize) {
17   |          --  -- lifetime `'b` defined here
18   |          |
19   |          lifetime `'a` defined here
20LL |     let y: Paramd<'a> = Paramd { x: a };
21LL |     let z: Option<&'b Paramd<'a>> = None;
22   |            ^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'b`
23   |
24   = help: consider adding the following bound: `'a: 'b`
25
26error: lifetime may not live long enough
27  --> $DIR/regions-free-region-ordering-caller.rs:22:12
28   |
29LL | fn call4<'a, 'b>(a: &'a usize, b: &'b usize) {
30   |          --  -- lifetime `'b` defined here
31   |          |
32   |          lifetime `'a` defined here
33LL |     let z: Option<&'a &'b usize> = None;
34   |            ^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'a`
35   |
36   = help: consider adding the following bound: `'b: 'a`
37
38error: aborting due to 3 previous errors
39