Fix missing dependency file with -Zunpretty
This commit is contained in:
parent
c435af0d5c
commit
8229d8e251
3 changed files with 14 additions and 0 deletions
|
@ -393,6 +393,10 @@ fn run_compiler(
|
||||||
pretty::print_after_hir_lowering(tcx, *ppm);
|
pretty::print_after_hir_lowering(tcx, *ppm);
|
||||||
Ok(())
|
Ok(())
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
|
// Make sure the `output_filenames` query is run for its side
|
||||||
|
// effects of writing the dep-info and reporting errors.
|
||||||
|
queries.global_ctxt()?.enter(|tcx| tcx.output_filenames(()));
|
||||||
} else {
|
} else {
|
||||||
let krate = queries.parse()?.steal();
|
let krate = queries.parse()?.steal();
|
||||||
pretty::print_after_parsing(sess, &krate, *ppm);
|
pretty::print_after_parsing(sess, &krate, *ppm);
|
||||||
|
|
9
tests/run-make/pretty-print-with-dep-file/Makefile
Normal file
9
tests/run-make/pretty-print-with-dep-file/Makefile
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
include ../tools.mk
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(RUSTC) --emit=dep-info -Zunpretty=expanded with-dep.rs
|
||||||
|
$(CGREP) "with-dep.rs" < $(TMPDIR)/with-dep.d
|
||||||
|
-rm $(TMPDIR)/with-dep.d
|
||||||
|
|
||||||
|
$(RUSTC) --emit=dep-info -Zunpretty=normal with-dep.rs
|
||||||
|
! test -f $(TMPDIR)/with-dep.d
|
1
tests/run-make/pretty-print-with-dep-file/with-dep.rs
Normal file
1
tests/run-make/pretty-print-with-dep-file/with-dep.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
fn main() {}
|
Loading…
Add table
Add a link
Reference in a new issue