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

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

fn main() {}