]> git.proxmox.com Git - rustc.git/blob - src/test/ui/regions/regions-free-region-ordering-caller.migrate.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / regions / regions-free-region-ordering-caller.migrate.stderr
1 error[E0491]: in type `&'b &'a usize`, reference has a longer lifetime than the data it references
2 --> $DIR/regions-free-region-ordering-caller.rs:11:12
3 |
4 LL | let z: Option<&'b &'a usize> = None;
5 | ^^^^^^^^^^^^^^^^^^^^^
6 |
7 note: the pointer is valid for the lifetime `'b` as defined on the function body at 10:14
8 --> $DIR/regions-free-region-ordering-caller.rs:10:14
9 |
10 LL | fn call2<'a, 'b>(a: &'a usize, b: &'b usize) {
11 | ^^
12 note: but the referenced data is only valid for the lifetime `'a` as defined on the function body at 10:10
13 --> $DIR/regions-free-region-ordering-caller.rs:10:10
14 |
15 LL | fn call2<'a, 'b>(a: &'a usize, b: &'b usize) {
16 | ^^
17
18 error[E0491]: in type `&'b Paramd<'a>`, reference has a longer lifetime than the data it references
19 --> $DIR/regions-free-region-ordering-caller.rs:17:12
20 |
21 LL | let z: Option<&'b Paramd<'a>> = None;
22 | ^^^^^^^^^^^^^^^^^^^^^^
23 |
24 note: the pointer is valid for the lifetime `'b` as defined on the function body at 15:14
25 --> $DIR/regions-free-region-ordering-caller.rs:15:14
26 |
27 LL | fn call3<'a, 'b>(a: &'a usize, b: &'b usize) {
28 | ^^
29 note: but the referenced data is only valid for the lifetime `'a` as defined on the function body at 15:10
30 --> $DIR/regions-free-region-ordering-caller.rs:15:10
31 |
32 LL | fn call3<'a, 'b>(a: &'a usize, b: &'b usize) {
33 | ^^
34
35 error[E0491]: in type `&'a &'b usize`, reference has a longer lifetime than the data it references
36 --> $DIR/regions-free-region-ordering-caller.rs:22:12
37 |
38 LL | let z: Option<&'a &'b usize> = None;
39 | ^^^^^^^^^^^^^^^^^^^^^
40 |
41 note: the pointer is valid for the lifetime `'a` as defined on the function body at 21:10
42 --> $DIR/regions-free-region-ordering-caller.rs:21:10
43 |
44 LL | fn call4<'a, 'b>(a: &'a usize, b: &'b usize) {
45 | ^^
46 note: but the referenced data is only valid for the lifetime `'b` as defined on the function body at 21:14
47 --> $DIR/regions-free-region-ordering-caller.rs:21:14
48 |
49 LL | fn call4<'a, 'b>(a: &'a usize, b: &'b usize) {
50 | ^^
51
52 error: aborting due to 3 previous errors
53
54 For more information about this error, try `rustc --explain E0491`.