rust-clippy/tests/used_underscore_binding_macro.rs

17 lines
342 B
Rust
Raw Normal View History

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