rust/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
244 B
Rust
Raw Normal View History

2022-04-01 21:29:27 -05:00
// revisions: base nll
// ignore-compare-mode-nll
//[nll] compile-flags: -Z borrowck=mir
fn foo(x: &mut Vec<&'_ u8>, y: &'_ u8) { x.push(y); }
//[base]~^ ERROR lifetime mismatch
//[nll]~^^ ERROR lifetime may not live long enough
fn main() {}