summary refs log tree commit diff
path: root/src/test/ui/conditional-compilation/cfg_attr_path.rs
blob: 9e9ff6622ce968b5a8dda15829156c0c34d32e16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// compile-pass
// skip-codegen
#![allow(dead_code)]
#![deny(unused_attributes)] // c.f #35584
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() {
    let _ = auxiliary::namespaced_enums::Foo::A;
    let _ = auxiliary::nonexistent_file::Foo::A;
}