2022-05-22 01:05:15 -05:00
|
|
|
// revisions: base nll
|
|
|
|
// ignore-compare-mode-nll
|
|
|
|
//[nll] compile-flags: -Z borrowck=mir
|
|
|
|
|
2017-08-25 01:21:22 -05:00
|
|
|
fn foo<'a,'b>(x: &mut Vec<&'a u8>, y: &'b u8) {
|
2022-05-22 01:05:15 -05:00
|
|
|
x.push(y);
|
|
|
|
//[base]~^ ERROR lifetime mismatch
|
|
|
|
//[nll]~^^ ERROR lifetime may not live long enough
|
2017-08-25 01:21:22 -05:00
|
|
|
}
|
|
|
|
|
2017-11-20 06:13:27 -06:00
|
|
|
fn main() { }
|