We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e9302b3 + 485c14f commit fc20d02Copy full SHA for fc20d02
compiler/rustc_middle/src/hir/map.rs
@@ -1176,15 +1176,14 @@ pub(super) fn crate_hash(tcx: TyCtxt<'_>, _: LocalCrate) -> Svh {
1176
debugger_visualizers.hash_stable(&mut hcx, &mut stable_hasher);
1177
if tcx.sess.opts.incremental.is_some() {
1178
let definitions = tcx.untracked().definitions.freeze();
1179
- let mut owner_spans: Vec<_> = krate
1180
- .owners
1181
- .iter_enumerated()
1182
- .filter_map(|(def_id, info)| {
1183
- let _ = info.as_owner()?;
+ let mut owner_spans: Vec<_> = tcx
+ .hir_crate_items(())
+ .definitions()
+ .map(|def_id| {
1184
let def_path_hash = definitions.def_path_hash(def_id);
1185
let span = tcx.source_span(def_id);
1186
debug_assert_eq!(span.parent(), None);
1187
- Some((def_path_hash, span))
+ (def_path_hash, span)
1188
})
1189
.collect();
1190
owner_spans.sort_unstable_by_key(|bn| bn.0);
0 commit comments