mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
18 lines
214 B
Rust
18 lines
214 B
Rust
struct Foo<'a, 'b> {
|
|
x: &'a u32,
|
|
y: &'b u32,
|
|
}
|
|
|
|
struct Bar<'b> {
|
|
z: &'b u32,
|
|
}
|
|
|
|
impl Foo<'_, '_> {
|
|
fn take_bar(&mut self, b: Bar<'_>) {
|
|
self.y = b.z
|
|
//~^ ERROR
|
|
}
|
|
}
|
|
|
|
fn main() {}
|