fork/rust

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

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
1.4 KiB32 linesraw
1error[E0623]: lifetime mismatch
2  --> $DIR/regions-free-region-ordering-caller.rs:11:12
3   |
4LL | fn call2<'a, 'b>(a: &'a usize, b: &'b usize) {
5   |                     ---------     ---------
6   |                     |
7   |                     these two types are declared with different lifetimes...
8LL |     let z: Option<&'b &'a usize> = None;
9   |            ^^^^^^^^^^^^^^^^^^^^^ ...but data from `a` flows into `b` here
10
11error[E0623]: lifetime mismatch
12  --> $DIR/regions-free-region-ordering-caller.rs:17:12
13   |
14LL | fn call3<'a, 'b>(a: &'a usize, b: &'b usize) {
15   |                     ---------     ---------
16   |                     |
17   |                     these two types are declared with different lifetimes...
18LL |     let y: Paramd<'a> = Paramd { x: a };
19LL |     let z: Option<&'b Paramd<'a>> = None;
20   |            ^^^^^^^^^^^^^^^^^^^^^^ ...but data from `a` flows into `b` here
21
22error[E0623]: lifetime mismatch
23  --> $DIR/regions-free-region-ordering-caller.rs:22:12
24   |
25LL | fn call4<'a, 'b>(a: &'a usize, b: &'b usize) {
26   |                     ---------     --------- these two types are declared with different lifetimes...
27LL |     let z: Option<&'a &'b usize> = None;
28   |            ^^^^^^^^^^^^^^^^^^^^^ ...but data from `b` flows into `a` here
29
30error: aborting due to 3 previous errors
31
32For more information about this error, try `rustc --explain E0623`.