summaryrefslogtreecommitdiffstats
path: root/src/test/ui/conditional-compilation/cfg-attr-multi-false.rs
blob: 0c7e7cad0359f2d07aa0b223b332efd9ebf207b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Test that cfg_attr doesn't emit any attributes when the
// configuration variable is false. This mirrors `cfg-attr-multi-true.rs`

// build-pass (FIXME(62277): could be check-pass?)

#![warn(unused_must_use)]

#[cfg_attr(any(), deprecated, must_use)]
struct Struct {}

impl Struct {
    fn new() -> Struct {
        Struct {}
    }
}

fn main() {
    Struct::new();
}