summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/issue-89469.rs
blob: 3a6ab452840acbea313677cfb5d0bc3c4c8cdfba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Regression test for #89469, where an extra non_snake_case warning was
// reported for a shorthand field binding.

// check-pass
#![deny(non_snake_case)]

#[allow(non_snake_case)]
struct Entry {
    A: u16,
    a: u16
}

fn foo() -> Entry {todo!()}

pub fn f() {
    let Entry { A, a } = foo();
    let _ = (A, a);
}

fn main() {}