Make the ICEs in the mir typechecker have more spans helpful
This commit is contained in:
parent
6773e7ee56
commit
9909cb902f
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue