summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.rs
blob: db934a0bede726880015a6c76dc3ae9d99fae986 (plain)
1
2
3
4
5
6
7
8
9
10
struct Ref<'a> {
    x: &'a u32,
}

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

fn main() {}