]> git.proxmox.com Git - rustc.git/blob - src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / lifetimes / lifetime-errors / ex3-both-anon-regions-3.stderr
1 error: lifetime may not live long enough
2 --> $DIR/ex3-both-anon-regions-3.rs:2:5
3 |
4 LL | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) {
5 | - - let's call the lifetime of this reference `'1`
6 | |
7 | let's call the lifetime of this reference `'2`
8 LL | z.push((x,y));
9 | ^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
10 |
11 help: consider introducing a named lifetime parameter
12 |
13 LL | fn foo<'a>(z: &mut Vec<(&'a u8,&u8)>, (x, y): (&'a u8, &u8)) {
14 | ++++ ++ ++
15
16 error: lifetime may not live long enough
17 --> $DIR/ex3-both-anon-regions-3.rs:2:5
18 |
19 LL | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) {
20 | - - let's call the lifetime of this reference `'3`
21 | |
22 | let's call the lifetime of this reference `'4`
23 LL | z.push((x,y));
24 | ^^^^^^^^^^^^^ argument requires that `'3` must outlive `'4`
25 |
26 help: consider introducing a named lifetime parameter
27 |
28 LL | fn foo<'a>(z: &mut Vec<(&u8,&'a u8)>, (x, y): (&u8, &'a u8)) {
29 | ++++ ++ ++
30
31 error: aborting due to 2 previous errors
32