]> git.lizzy.rs Git - rust.git/blob - tests/run-pass/used_underscore_binding_macro.rs
Adapt run-pass tests to the tool_lints
[rust.git] / tests / run-pass / used_underscore_binding_macro.rs
1 #![feature(tool_lints)]
2
3 #![allow(clippy::useless_attribute)] //issue #2910
4
5 #[macro_use]
6 extern crate serde_derive;
7
8 /// Test 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() {}