Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions compiler/rustc_driver_impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,10 @@ fn run_compiler(
pretty::print_after_hir_lowering(tcx, *ppm);
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 {
let krate = queries.parse()?.steal();
pretty::print_after_parsing(sess, &krate, *ppm);
Expand Down
9 changes: 9 additions & 0 deletions tests/run-make/pretty-print-with-dep-file/Makefile
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions tests/run-make/pretty-print-with-dep-file/with-dep.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fn main() {}