rust/tests/used_underscore_binding_macro.rs

17 lines
352 B
Rust
Raw Normal View History

2015-12-21 03:40:19 -06:00
#![feature(plugin)]
#![plugin(clippy)]
#[macro_use] extern crate serde_derive;
2015-12-21 03:40:19 -06:00
2016-03-19 11:48:29 -05:00
/// Test that we do not lint for unused underscores in a `MacroAttribute` expansion
2015-12-21 03:40:19 -06:00
#[deny(used_underscore_binding)]
#[derive(Deserialize)]
2015-12-21 03:40:19 -06:00
struct MacroAttributesTest {
_foo: u32,
}
#[test]
fn macro_attributes_test() {
let _ = MacroAttributesTest { _foo: 0 };
2015-12-21 03:40:19 -06:00
}