mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Rollup merge of #152655 - zetanumbers:disable_debug_assert_151509, r=nnethercote
Disable debug_assert_not_in_new_nodes for multiple threads Fixes rust-lang/rust#152654 This debug assertion is no longer intended to succeed for the parallel compiler since rust-lang/rust#151509 doesn't panic on a red-green query graph coloring race, generating both red and green nodes (https://github.com/rust-lang/rust/pull/151509#discussion_r2764707236)
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
use rustc_data_structures::profiling::QueryInvocationId;
|
||||
use rustc_data_structures::sharded::{self, ShardedHashMap};
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_data_structures::sync::{AtomicU64, Lock};
|
||||
use rustc_data_structures::sync::{AtomicU64, Lock, is_dyn_thread_safe};
|
||||
use rustc_data_structures::unord::UnordMap;
|
||||
use rustc_data_structures::{assert_matches, outline};
|
||||
use rustc_errors::DiagInner;
|
||||
@@ -1302,7 +1302,9 @@ fn debug_assert_not_in_new_nodes(
|
||||
prev_graph: &SerializedDepGraph,
|
||||
prev_index: SerializedDepNodeIndex,
|
||||
) {
|
||||
if let Some(ref nodes_in_current_session) = self.nodes_in_current_session {
|
||||
if !is_dyn_thread_safe()
|
||||
&& let Some(ref nodes_in_current_session) = self.nodes_in_current_session
|
||||
{
|
||||
debug_assert!(
|
||||
!nodes_in_current_session
|
||||
.lock()
|
||||
|
||||
Reference in New Issue
Block a user