]> git.lizzy.rs Git - rust.git/blob - tests/incremental/remove_source_file/main.rs
Rollup merge of #107524 - cjgillot:both-storage, r=RalfJung
[rust.git] / tests / incremental / remove_source_file / main.rs
1 // This test case makes sure that the compiler doesn't crash due to a failing
2 // table lookup when a source file is removed.
3
4 // revisions:cfail1 cfail2
5
6 // Note that we specify -g so that the SourceFiles actually get referenced by the
7 // incr. comp. cache:
8 // compile-flags: -Z query-dep-graph -g
9 // build-pass (FIXME(62277): could be check-pass?)
10
11 #![crate_type= "rlib"]
12
13 #[cfg(cfail1)]
14 mod auxiliary;
15
16 #[cfg(cfail1)]
17 pub fn foo() {
18     auxiliary::print_hello();
19 }
20
21 #[cfg(cfail2)]
22 pub fn foo() {
23     println!("hello");
24 }