rust/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.rs
2023-01-11 09:32:08 +00:00

12 lines
157 B
Rust

struct Ref<'a, 'b> {
a: &'a u32,
b: &'b u32,
}
fn foo(mut x: Ref) {
x.a = x.b;
//~^ ERROR lifetime may not live long enough
}
fn main() {}