rust/src/test/ui/conditional-compilation/cfg-attr-multi-false.rs

20 lines
336 B
Rust
Raw Normal View History

// Test that cfg_attr doesn't emit any attributes when the
2018-10-22 18:21:55 +02:00
// configuration variable is false. This mirrors `cfg-attr-multi-true.rs`
// compile-pass
#![warn(unused_must_use)]
#[cfg_attr(any(), deprecated, must_use)]
struct Struct {}
impl Struct {
fn new() -> Struct {
Struct {}
}
}
fn main() {
Struct::new();
}