mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
12 lines
164 B
Rust
12 lines
164 B
Rust
struct Ref<'a, 'b> {
|
|
a: &'a u32,
|
|
b: &'b u32,
|
|
}
|
|
|
|
fn foo(mut x: Ref, y: &u32) {
|
|
x.b = y;
|
|
//~^ ERROR lifetime may not live long enough
|
|
}
|
|
|
|
fn main() {}
|