]> git.lizzy.rs Git - rust.git/blob - src/test/incremental/issue-38222.rs
Auto merge of #100595 - matthiaskrgr:rollup-f1zur58, r=matthiaskrgr
[rust.git] / src / test / incremental / issue-38222.rs
1 // Test that debuginfo does not introduce a dependency edge to the hir_crate
2 // dep-node.
3
4 // revisions:rpass1 rpass2
5 // compile-flags: -Z query-dep-graph
6
7 #![feature(rustc_attrs)]
8 #![rustc_partition_reused(module = "issue_38222-mod1", cfg = "rpass2")]
9 // If codegen had added a dependency edge to the hir_crate dep-node, nothing would
10 // be re-used, so checking that this module was re-used is sufficient.
11 #![rustc_partition_reused(module = "issue_38222", cfg = "rpass2")]
12
13 //[rpass1] compile-flags: -C debuginfo=1
14 //[rpass2] compile-flags: -C debuginfo=1
15
16 pub fn main() {
17     mod1::some_fn();
18 }
19
20 mod mod1 {
21     pub fn some_fn() {
22         #[cfg(rpass2)]
23         {}
24
25         let _ = 1;
26     }
27 }