mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
b717aa1b95
Mainly so that it is easier to only run all `non-snake-case`-specific tests but no other tests with: ./x test tests/ui/lint/non-snake-case But also to reduce the size of the large `tests/ui/lint` directory. And rename some tests to pass tidy, and remove them from `src/tools/tidy/src/issues.txt`.
21 lines
334 B
Rust
21 lines
334 B
Rust
// 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() {}
|