]> git.lizzy.rs Git - rust.git/blob - tests/ui/conditional-compilation/cfg-attr-multi-false.rs
Rollup merge of #107700 - jyn514:tools-builder, r=Mark-Simulacrum
[rust.git] / tests / ui / conditional-compilation / cfg-attr-multi-false.rs
1 // Test that cfg_attr doesn't emit any attributes when the
2 // configuration variable is false. This mirrors `cfg-attr-multi-true.rs`
3
4 // build-pass (FIXME(62277): could be check-pass?)
5
6 #![warn(unused_must_use)]
7
8 #[cfg_attr(any(), deprecated, must_use)]
9 struct Struct {}
10
11 impl Struct {
12     fn new() -> Struct {
13         Struct {}
14     }
15 }
16
17 fn main() {
18     Struct::new();
19 }