summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/issue-52742.rs
blob: d3e201b8ae8e7ab09ee45b0ad1fd9729667cebd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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() {}