rust/tests/incremental/remove_source_file/main.rs

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

25 lines
526 B
Rust
Raw Normal View History

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.
//@ 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
//@ build-pass (FIXME(62277): could be check-pass?)
2017-05-10 04:00:08 -05:00
#![crate_type= "rlib"]
#[cfg(cfail1)]
2017-05-10 04:00:08 -05:00
mod auxiliary;
#[cfg(cfail1)]
pub fn foo() {
2017-05-10 04:00:08 -05:00
auxiliary::print_hello();
}
#[cfg(cfail2)]
pub fn foo() {
2017-05-10 04:00:08 -05:00
println!("hello");
}