summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/unused_variables-issue-82488.rs
blob: 007b0799bbb0d9e81eca0a5412332b2d037381f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// run-rustfix
#![deny(unused_variables)]

struct Point {
    x: u32,
    y: u32
}

fn process_point(Point { x, y: renamed }: Point) {
//~^ ERROR unused variable: `renamed`
    let _ = x;
}

fn main() {
    process_point(Point { x: 0, y: 0 });
}