rust/tests/run-pass/used_underscore_binding_macro.rs
2018-08-29 11:08:29 -07:00

22 lines
415 B
Rust

#![feature(tool_lints)]
#![allow(clippy::useless_attribute)] //issue #2910
#[macro_use]
extern crate serde_derive;
/// Test that we do not lint for unused underscores in a `MacroAttribute`
/// expansion
#[deny(clippy::used_underscore_binding)]
#[derive(Deserialize)]
struct MacroAttributesTest {
_foo: u32,
}
#[test]
fn macro_attributes_test() {
let _ = MacroAttributesTest { _foo: 0 };
}
fn main() {}