]> git.lizzy.rs Git - rust.git/blob - tests/ui/crashes/used_underscore_binding_macro.rs
Auto merge of #5246 - JarredAllen:master, r=flip1995
[rust.git] / tests / ui / crashes / used_underscore_binding_macro.rs
1 // run-pass
2
3 #![allow(clippy::useless_attribute)] //issue #2910
4
5 #[macro_use]
6 extern crate serde_derive;
7
8 /// Tests that we do not lint for unused underscores in a `MacroAttribute`
9 /// expansion
10 #[deny(clippy::used_underscore_binding)]
11 #[derive(Deserialize)]
12 struct MacroAttributesTest {
13     _foo: u32,
14 }
15
16 #[test]
17 fn macro_attributes_test() {
18     let _ = MacroAttributesTest { _foo: 0 };
19 }
20
21 fn main() {}