@@ -649,18 +649,17 @@ impl<K: DepKind> DepGraph<K> {
649649impl < K : DepKind > DepGraphData < K > {
650650 fn assert_dep_node_not_yet_allocated_in_current_session < S : std:: fmt:: Display > (
651651 & self ,
652- _dep_node : & DepNode < K > ,
653- _msg : impl FnOnce ( ) -> S ,
652+ dep_node : & DepNode < K > ,
653+ msg : impl FnOnce ( ) -> S ,
654654 ) {
655- #[ cfg( debug_assertions) ]
656- if let Some ( prev_index) = self . previous . node_to_index_opt ( _dep_node) {
655+ if let Some ( prev_index) = self . previous . node_to_index_opt ( dep_node) {
657656 let current = self . current . prev_index_to_index . lock ( ) [ prev_index] ;
658- assert ! ( current. is_none( ) , "{}" , _msg ( ) )
657+ assert ! ( current. is_none( ) , "{}" , msg ( ) )
659658 } else if let Some ( nodes_newly_allocated_in_current_session) =
660659 & self . current . nodes_newly_allocated_in_current_session
661660 {
662- let seen = nodes_newly_allocated_in_current_session. lock ( ) . contains ( _dep_node ) ;
663- assert ! ( !seen, "{}" , _msg ( ) ) ;
661+ let seen = nodes_newly_allocated_in_current_session. lock ( ) . contains ( dep_node ) ;
662+ assert ! ( !seen, "{}" , msg ( ) ) ;
664663 }
665664 }
666665
@@ -980,9 +979,7 @@ impl<K: DepKind> DepGraph<K> {
980979 dep_node : & DepNode < K > ,
981980 msg : impl FnOnce ( ) -> S ,
982981 ) {
983- if cfg ! ( debug_assertions)
984- && let Some ( data) = & self . data
985- {
982+ if let Some ( data) = & self . data {
986983 data. assert_dep_node_not_yet_allocated_in_current_session ( dep_node, msg)
987984 }
988985 }
@@ -1128,7 +1125,6 @@ pub(super) struct CurrentDepGraph<K: DepKind> {
11281125 ///
11291126 /// The map contains all DepNodes that have been allocated in the current session so far and
11301127 /// for which there is no equivalent in the previous session.
1131- #[ cfg( debug_assertions) ]
11321128 nodes_newly_allocated_in_current_session : Option < Lock < FxHashSet < DepNode < K > > > > ,
11331129
11341130 /// Anonymous `DepNode`s are nodes whose IDs we compute from the list of
@@ -1212,7 +1208,6 @@ impl<K: DepKind> CurrentDepGraph<K> {
12121208 forbidden_edge,
12131209 #[ cfg( debug_assertions) ]
12141210 fingerprints : Lock :: new ( IndexVec :: from_elem_n ( None , new_node_count_estimate) ) ,
1215- #[ cfg( debug_assertions) ]
12161211 nodes_newly_allocated_in_current_session : session
12171212 . opts
12181213 . unstable_opts
@@ -1253,7 +1248,6 @@ impl<K: DepKind> CurrentDepGraph<K> {
12531248 #[ cfg( debug_assertions) ]
12541249 self . record_edge ( dep_node_index, key, current_fingerprint) ;
12551250
1256- #[ cfg( debug_assertions) ]
12571251 if let Some ( ref nodes_newly_allocated_in_current_session) =
12581252 self . nodes_newly_allocated_in_current_session
12591253 {
0 commit comments