rust/src/test/ui/lifetimes/issue-90170-elision-mismatch.fixed

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

15 lines
512 B
Rust
Raw Normal View History

2022-05-22 06:05:15 +00:00
// FIXME(nll): On NLL stabilization, this should be replaced by
// `issue-90170-elision-mismatch-nll.rs`. Compiletest has
// problems with rustfix and revisions.
// ignore-compare-mode-nll
// run-rustfix
pub fn foo<'a>(x: &mut Vec<&'a u8>, y: &'a u8) { x.push(y); } //~ ERROR lifetime mismatch
pub fn foo2<'a>(x: &mut Vec<&'a u8>, y: &'a u8) { x.push(y); } //~ ERROR lifetime mismatch
pub fn foo3<'a>(_other: &'a [u8], x: &mut Vec<&'a u8>, y: &'a u8) { x.push(y); } //~ ERROR lifetime mismatch
fn main() {}