Skip to content

Commit 5030922

Browse files
Ariel Ben-Yehudaalexcrichton
Ariel Ben-Yehuda
authored andcommitted
Rollup merge of rust-lang#40344 - nrc:save-container, r=eddyb
save-analysis: cope with lack of method data after a type error Fixes rust-lang#39957 r? @eddyb
2 parents 008bbd3 + 779d280 commit 5030922

File tree

1 file changed

+4
-1
lines changed
  • src/librustc_save_analysis

1 file changed

+4
-1
lines changed

src/librustc_save_analysis/lib.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,10 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
387387
}
388388
}
389389
None => {
390-
span_bug!(span, "Could not find container for method {}", id);
390+
debug!("Could not find container for method {} at {:?}", id, span);
391+
// This is not necessarily a bug, if there was a compilation error, the tables
392+
// we need might not exist.
393+
return None;
391394
}
392395
},
393396
};

0 commit comments

Comments
 (0)