rust/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.rs

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

10 lines
156 B
Rust
Raw Normal View History

struct Ref<'a, T: 'a> {
data: &'a T
}
fn foo<'a>(x: Ref<i32>, y: &mut Vec<Ref<'a, i32>>) {
2017-11-20 06:13:27 -06:00
y.push(x); //~ ERROR explicit lifetime
}
fn main() { }