]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/issue-89469.rs
Auto merge of #106884 - clubby789:fieldless-enum-debug, r=michaelwoerister
[rust.git] / tests / ui / lint / issue-89469.rs
1 // Regression test for #89469, where an extra non_snake_case warning was
2 // reported for a shorthand field binding.
3
4 // check-pass
5 #![deny(non_snake_case)]
6
7 #[allow(non_snake_case)]
8 struct Entry {
9     A: u16,
10     a: u16
11 }
12
13 fn foo() -> Entry {todo!()}
14
15 pub fn f() {
16     let Entry { A, a } = foo();
17     let _ = (A, a);
18 }
19
20 fn main() {}