about summary refs log tree commit diff
path: root/tests/ui/lifetimes/issue-90170-elision-mismatch.rs
blob: c32f4d5c8beb4db62d083d37346b538c7cef29f7 (plain)
1
2
3
4
5
6
7
8
9
//@ 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() {}