Skip to content

Commit 1527d8e

Browse files
author
Ariel Ben-Yehuda
authored
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 6029d38 + e5d1b9c commit 1527d8e

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
@@ -395,7 +395,10 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
395395
}
396396
}
397397
None => {
398-
span_bug!(span, "Could not find container for method {}", id);
398+
debug!("Could not find container for method {} at {:?}", id, span);
399+
// This is not necessarily a bug, if there was a compilation error, the tables
400+
// we need might not exist.
401+
return None;
399402
}
400403
},
401404
};

0 commit comments

Comments
 (0)