Make the ICEs in the mir typechecker have more spans helpful

This commit is contained in:
Oli Scherer 2022-11-03 08:17:55 +00:00
parent 6773e7ee56
commit 9909cb902f

View file

@ -81,6 +81,7 @@ struct TypeChecker<'a, 'tcx> {
}
impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
#[track_caller]
fn fail(&self, location: Location, msg: impl AsRef<str>) {
let span = self.body.source_info(location).span;
// We use `delay_span_bug` as we might see broken MIR when other errors have already