Skip to content

Commit 9fb9225

Browse files
committed
Disable debug_assert_not_in_new_nodes for multiple threads
1 parent 75b9d89 commit 9fb9225

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • compiler/rustc_middle/src/dep_graph

compiler/rustc_middle/src/dep_graph/graph.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet};
99
use rustc_data_structures::profiling::QueryInvocationId;
1010
use rustc_data_structures::sharded::{self, ShardedHashMap};
1111
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
12-
use rustc_data_structures::sync::{AtomicU64, Lock};
12+
use rustc_data_structures::sync::{AtomicU64, Lock, is_dyn_thread_safe};
1313
use rustc_data_structures::unord::UnordMap;
1414
use rustc_data_structures::{assert_matches, outline};
1515
use rustc_errors::DiagInner;
@@ -1311,7 +1311,9 @@ impl<D: Deps> CurrentDepGraph<D> {
13111311
prev_graph: &SerializedDepGraph,
13121312
prev_index: SerializedDepNodeIndex,
13131313
) {
1314-
if let Some(ref nodes_in_current_session) = self.nodes_in_current_session {
1314+
if !is_dyn_thread_safe()
1315+
&& let Some(ref nodes_in_current_session) = self.nodes_in_current_session
1316+
{
13151317
debug_assert!(
13161318
!nodes_in_current_session
13171319
.lock()

0 commit comments

Comments
 (0)