Skip to content

Commit 269196d

Browse files
committed
skip debug dep node code in non-incremental mode
1 parent 55d4364 commit 269196d

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
@@ -307,6 +307,7 @@ impl Session {
307307
pub fn record_trimmed_def_paths(&self) {
308308
if self.opts.unstable_opts.print_type_sizes
309309
|| self.opts.unstable_opts.query_dep_graph
310+
|| self.opts.unstable_opts.incremental_info
310311
|| self.opts.unstable_opts.dump_mir.is_some()
311312
|| self.opts.unstable_opts.unpretty.is_some()
312313
|| self.opts.output_types.contains_key(&OutputType::Mir)

0 commit comments

Comments
 (0)