rust/tests/ui/conditional-compilation/cfg_attr_path.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
347 B
Rust
Raw Normal View History

2019-06-12 10:18:32 -05:00
// check-pass
2016-08-12 03:30:48 -05:00
#![deny(unused_attributes)] // c.f #35584
2019-06-12 10:18:32 -05:00
2016-08-12 03:30:48 -05:00
mod auxiliary {
#[cfg_attr(any(), path = "nonexistent_file.rs")] pub mod namespaced_enums;
#[cfg_attr(all(), path = "namespaced_enums.rs")] pub mod nonexistent_file;
}
fn main() {
2016-08-12 03:30:48 -05:00
let _ = auxiliary::namespaced_enums::Foo::A;
let _ = auxiliary::nonexistent_file::Foo::A;
}