diff options
Diffstat (limited to 'compiler/rustc_query_impl/src/stats.rs')
| -rw-r--r-- | compiler/rustc_query_impl/src/stats.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rustc_query_impl/src/stats.rs b/compiler/rustc_query_impl/src/stats.rs index 4d52483c3b8..e877034bd7b 100644 --- a/compiler/rustc_query_impl/src/stats.rs +++ b/compiler/rustc_query_impl/src/stats.rs @@ -50,13 +50,12 @@ where key_type: type_name::<C::Key>(), value_size: mem::size_of::<C::Value>(), value_type: type_name::<C::Value>(), - entry_count: map.iter_results(|results| results.count()), + entry_count: 0, local_def_id_keys: None, }; - map.iter_results(|results| { - for (key, _, _) in results { - key.key_stats(&mut stats) - } + map.iter_results(&mut |key, _, _| { + stats.entry_count += 1; + key.key_stats(&mut stats) }); stats } |
