Skip to content

Commit 4c7778f

Browse files
committed
skip debug dep node code in non-incremental mode
1 parent beeb8e3 commit 4c7778f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

compiler/rustc_query_system/src/dep_graph/graph.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,10 @@ impl<D: Deps> DepGraph<D> {
808808
where
809809
F: FnOnce() -> String,
810810
{
811-
let dep_node_debug = &self.data.as_ref().unwrap().dep_node_debug;
811+
let Some(data) = &self.data.as_ref() else {
812+
return;
813+
};
814+
let dep_node_debug = &data.dep_node_debug;
812815

813816
if dep_node_debug.borrow().contains_key(&dep_node) {
814817
return;

compiler/rustc_session/src/session.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ impl Session {
336336
pub fn record_trimmed_def_paths(&self) {
337337
if self.opts.unstable_opts.print_type_sizes
338338
|| self.opts.unstable_opts.query_dep_graph
339+
|| self.opts.unstable_opts.incremental_info
339340
|| self.opts.unstable_opts.dump_mir.is_some()
340341
|| self.opts.unstable_opts.unpretty.is_some()
341342
|| self.prof.is_args_recording_enabled()

0 commit comments

Comments
 (0)