summaryrefslogtreecommitdiffstats
path: root/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.rs
blob: 00de48278b27ca792781b4f5f227696efa5cb375 (plain)
1
2
3
4
5
6
7
8
struct Ref<'a, 'b> { a: &'a u32, b: &'b u32 }

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

fn main() { }