1 // Test that cfg_attr with multiple attributes actually emits both attributes.
2 // This is done by emitting two attributes that cause new warnings, and then
3 // triggering those warnings.
5 // build-pass (FIXME(62277): could be check-pass?)
7 #![warn(unused_must_use)]
9 #[cfg_attr(all(), deprecated, must_use)]
10 struct MustUseDeprecated {}
12 impl MustUseDeprecated { //~ warning: use of deprecated
13 fn new() -> MustUseDeprecated { //~ warning: use of deprecated
14 MustUseDeprecated {} //~ warning: use of deprecated
19 MustUseDeprecated::new(); //~ warning: use of deprecated
20 //~| warning: unused `MustUseDeprecated` that must be used