]> git.lizzy.rs Git - rust.git/blob - tests/run-pass/used_underscore_binding_macro.rs
8b6c6557b4947e4335ccb641bf1665d5d0401623
[rust.git] / tests / run-pass / used_underscore_binding_macro.rs
1 // Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution.
3 //
4 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7 // option. This file may not be copied, modified, or distributed
8 // except according to those terms.
9
10 #![allow(clippy::useless_attribute)] //issue #2910
11
12 #[macro_use]
13 extern crate serde_derive;
14
15 /// Test that we do not lint for unused underscores in a `MacroAttribute`
16 /// expansion
17 #[deny(clippy::used_underscore_binding)]
18 #[derive(Deserialize)]
19 struct MacroAttributesTest {
20     _foo: u32,
21 }
22
23 #[test]
24 fn macro_attributes_test() {
25     let _ = MacroAttributesTest { _foo: 0 };
26 }
27
28 fn main() {}