blob: 20d4d4200bc1eefa008d49ee77352cd904152cfe [file] [log] [blame]
John Kåre Alsaker20ce2f62020-02-06 11:46:261// Test that debuginfo does not introduce a dependency edge to the hir_crate
Michael Woerister271fb222016-12-08 17:47:352// dep-node.
3
4// revisions:rpass1 rpass2
Michael Woeristere6badfd2017-09-28 09:58:455// compile-flags: -Z query-dep-graph
6
Michael Woerister271fb222016-12-08 17:47:357#![feature(rustc_attrs)]
John Kåre Alsaker20ce2f62020-02-06 11:46:268#![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
Michael Woerister271fb222016-12-08 17:47:3510// be re-used, so checking that this module was re-used is sufficient.
John Kåre Alsaker20ce2f62020-02-06 11:46:2611#![rustc_partition_reused(module = "issue_38222", cfg = "rpass2")]
Michael Woerister271fb222016-12-08 17:47:3512
13//[rpass1] compile-flags: -C debuginfo=1
14//[rpass2] compile-flags: -C debuginfo=1
15
16pub fn main() {
17 mod1::some_fn();
18}
19
20mod mod1 {
21 pub fn some_fn() {
Michael Woeristercedae732017-10-27 16:57:1522 #[cfg(rpass2)]
23 {}
Michael Woerister271fb222016-12-08 17:47:3524
Michael Woeristercedae732017-10-27 16:57:1525 let _ = 1;
Michael Woerister271fb222016-12-08 17:47:3526 }
27}