Add regression test.
This commit is contained in:
parent
b08043ee69
commit
4943e96a0c
@ -8,5 +8,17 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#[cfg_attr(all(), path = "nonexistent_file.rs")] mod foo;
|
||||
//~^ ERROR nonexistent_file.rs
|
||||
#![feature(rustc_attrs)]
|
||||
#![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;
|
||||
}
|
||||
|
||||
#[rustc_error]
|
||||
fn main() { //~ ERROR compilation successful
|
||||
let _ = auxiliary::namespaced_enums::Foo::A;
|
||||
let _ = auxiliary::nonexistent_file::Foo::A;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user