]> git.proxmox.com Git - rustc.git/blame - src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.nll.stderr
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / underscore-lifetime / underscore-lifetime-elison-mismatch.nll.stderr
CommitLineData
48663c56 1error: lifetime may not live long enough
04454e1e 2 --> $DIR/underscore-lifetime-elison-mismatch.rs:5:42
48663c56
XL
3 |
4LL | fn foo(x: &mut Vec<&'_ u8>, y: &'_ u8) { x.push(y); }
5 | - - ^^^^^^^^^ argument requires that `'1` must outlive `'2`
6 | | |
7 | | let's call the lifetime of this reference `'1`
8 | let's call the lifetime of this reference `'2`
04454e1e
FG
9 |
10help: consider introducing a named lifetime parameter
11 |
12LL | fn foo<'a>(x: &mut Vec<&'a u8>, y: &'a u8) { x.push(y); }
13 | ++++ ~~ ~~
48663c56
XL
14
15error: aborting due to previous error
16