summaryrefslogtreecommitdiffstats
path: root/tests/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.rs
blob: 27424d79bc049dcdc887ef4c2ccc85656bea6133 (plain)
1
2
3
4
5
6
7
8
9
10
struct Ref<'a, T: 'a> {
    data: &'a T
}

fn foo(x: &mut Vec<Ref<i32>>, y: Ref<i32>) {
    x.push(y);
    //~^ ERROR lifetime may not live long enough
}

fn main() { }