rust/tests/ui/nll/issue-52742.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
214 B
Rust
Raw Normal View History

struct Foo<'a, 'b> {
x: &'a u32,
y: &'b u32,
}
struct Bar<'b> {
2018-12-11 15:49:40 -06:00
z: &'b u32,
}
impl Foo<'_, '_> {
fn take_bar(&mut self, b: Bar<'_>) {
self.y = b.z
//~^ ERROR
}
}
2018-12-11 15:49:40 -06:00
fn main() {}