2017-05-10 04:00:08 -05:00
|
|
|
// This test case makes sure that the compiler doesn't crash due to a failing
|
|
|
|
// table lookup when a source file is removed.
|
|
|
|
|
2017-11-08 04:30:14 -06:00
|
|
|
//@ revisions:cfail1 cfail2
|
2017-05-10 04:00:08 -05:00
|
|
|
|
2018-08-18 05:13:52 -05:00
|
|
|
// Note that we specify -g so that the SourceFiles actually get referenced by the
|
2017-05-10 04:00:08 -05:00
|
|
|
// incr. comp. cache:
|
|
|
|
//@ compile-flags: -Z query-dep-graph -g
|
2019-07-02 16:30:28 -05:00
|
|
|
//@ build-pass (FIXME(62277): could be check-pass?)
|
2017-05-10 04:00:08 -05:00
|
|
|
|
2017-11-08 04:30:14 -06:00
|
|
|
#![crate_type= "rlib"]
|
|
|
|
|
|
|
|
#[cfg(cfail1)]
|
2017-05-10 04:00:08 -05:00
|
|
|
mod auxiliary;
|
|
|
|
|
2017-11-08 04:30:14 -06:00
|
|
|
#[cfg(cfail1)]
|
|
|
|
pub fn foo() {
|
2017-05-10 04:00:08 -05:00
|
|
|
auxiliary::print_hello();
|
|
|
|
}
|
|
|
|
|
2017-11-08 04:30:14 -06:00
|
|
|
#[cfg(cfail2)]
|
|
|
|
pub fn foo() {
|
2017-05-10 04:00:08 -05:00
|
|
|
println!("hello");
|
|
|
|
}
|