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

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

15 lines
489 B
Rust
Raw Normal View History

2022-05-22 01:05:15 -05: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(x: &mut Vec<&u8>, y: &u8) { x.push(y); } //~ ERROR lifetime mismatch
pub fn foo2(x: &mut Vec<&'_ u8>, y: &u8) { x.push(y); } //~ ERROR lifetime mismatch
pub fn foo3<'a>(_other: &'a [u8], x: &mut Vec<&u8>, y: &u8) { x.push(y); } //~ ERROR lifetime mismatch
fn main() {}