diff --git a/compiler/rustc_middle/src/dep_graph/graph.rs b/compiler/rustc_middle/src/dep_graph/graph.rs index 08bb5efc685ee..21b522a2df253 100644 --- a/compiler/rustc_middle/src/dep_graph/graph.rs +++ b/compiler/rustc_middle/src/dep_graph/graph.rs @@ -1230,8 +1230,7 @@ impl CurrentDepGraph { CurrentDepGraph { encoder: GraphEncoder::new(session, encoder, prev_index_space_len, previous), anon_node_to_index: ShardedHashMap::with_capacity( - // FIXME: The count estimate is off as anon nodes are only a portion of the nodes. - new_node_count_estimate, + 3 * new_node_count_estimate / 100, // Reserve capacity for 3% anon nodes ), anon_id_seed, #[cfg(debug_assertions)]