mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-19 00:34:23 +00:00
10 lines
348 B
Rust
10 lines
348 B
Rust
//@ run-rustfix
|
|
|
|
pub fn foo(x: &mut Vec<&u8>, y: &u8) { x.push(y); } //~ ERROR lifetime may not live long enough
|
|
|
|
pub fn foo2(x: &mut Vec<&'_ u8>, y: &u8) { x.push(y); } //~ ERROR lifetime may not live long enough
|
|
|
|
pub fn foo3<'a>(_other: &'a [u8], x: &mut Vec<&u8>, y: &u8) { x.push(y); } //~ ERROR lifetime may not live long enough
|
|
|
|
fn main() {}
|