We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b9aae8 commit 9794fe5Copy full SHA for 9794fe5
src/test/compile-fail/cfg_attr_path.rs
@@ -8,5 +8,17 @@
8
// option. This file may not be copied, modified, or distributed
9
// except according to those terms.
10
11
-#[cfg_attr(all(), path = "nonexistent_file.rs")] mod foo;
12
-//~^ ERROR nonexistent_file.rs
+#![feature(rustc_attrs)]
+#![allow(dead_code)]
13
+#![deny(unused_attributes)] // c.f #35584
14
+
15
+mod auxiliary {
16
+ #[cfg_attr(any(), path = "nonexistent_file.rs")] pub mod namespaced_enums;
17
+ #[cfg_attr(all(), path = "namespaced_enums.rs")] pub mod nonexistent_file;
18
+}
19
20
+#[rustc_error]
21
+fn main() { //~ ERROR compilation successful
22
+ let _ = auxiliary::namespaced_enums::Foo::A;
23
+ let _ = auxiliary::nonexistent_file::Foo::A;
24
0 commit comments