Skip to content

Commit c4c4a8d

Browse files
committed
fix encode_node
1 parent bd8bff3 commit c4c4a8d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/rustc_query_system/src/dep_graph/serialized.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,9 @@ impl<K: DepKind> EncoderState<K> {
185185

186186
if let Some(record_graph) = &record_graph {
187187
// Do not ICE when a query is called from within `with_query`.
188-
record_graph.with_lock(|record_graph| record_graph.push(index, node.node, &node.edges))
188+
if let Some(record_graph) = &mut record_graph.try_lock() {
189+
record_graph.push(index, node.node, &node.edges);
190+
}
189191
};
190192

191193
if let Some(stats) = &mut self.stats {

0 commit comments

Comments
 (0)