File tree 1 file changed +5
-6
lines changed
compiler/rustc_middle/src/hir
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -1176,15 +1176,14 @@ pub(super) fn crate_hash(tcx: TyCtxt<'_>, _: LocalCrate) -> Svh {
1176
1176
debugger_visualizers. hash_stable ( & mut hcx, & mut stable_hasher) ;
1177
1177
if tcx. sess . opts . incremental . is_some ( ) {
1178
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 ( ) ?;
1179
+ let mut owner_spans: Vec < _ > = tcx
1180
+ . hir_crate_items ( ( ) )
1181
+ . definitions ( )
1182
+ . map ( |def_id| {
1184
1183
let def_path_hash = definitions. def_path_hash ( def_id) ;
1185
1184
let span = tcx. source_span ( def_id) ;
1186
1185
debug_assert_eq ! ( span. parent( ) , None ) ;
1187
- Some ( ( def_path_hash, span) )
1186
+ ( def_path_hash, span)
1188
1187
} )
1189
1188
. collect ( ) ;
1190
1189
owner_spans. sort_unstable_by_key ( |bn| bn. 0 ) ;
You can’t perform that action at this time.
0 commit comments