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

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

fn main() {}