]> git.lizzy.rs Git - rust.git/blob - tests/incremental/spans_significant_w_panic.rs
Auto merge of #107811 - matthiaskrgr:rollup-rpjzshk, r=matthiaskrgr
[rust.git] / tests / incremental / spans_significant_w_panic.rs
1 // This test makes sure that just changing a definition's location in the
2 // source file also changes its incr. comp. hash, if debuginfo is enabled.
3
4 // revisions:rpass1 rpass2
5
6 // compile-flags: -C overflow-checks=on -Z query-dep-graph
7
8 #![feature(rustc_attrs)]
9 #![rustc_partition_codegened(module = "spans_significant_w_panic", cfg = "rpass2")]
10
11 #[cfg(rpass1)]
12 pub fn main() {
13     if std::hint::black_box(false) {
14         panic!()
15     }
16 }
17
18 #[cfg(rpass2)]
19 #[rustc_clean(cfg = "rpass2")]
20 pub fn main() {
21     if std::hint::black_box(false) {
22         panic!()
23     }
24 }