1
Fork 0

Avoid an ICE in diagnostics

This commit is contained in:
Oli Scherer 2024-02-13 10:44:50 +00:00
parent 09d73fab08
commit d3a89cd214
3 changed files with 35 additions and 1 deletions

View file

@ -698,7 +698,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
),
..
}) => {
let hir::Ty { span, .. } = inputs[local.index() - 1];
let hir::Ty { span, .. } = *inputs.get(local.index() - 1)?;
Some(span)
}
_ => None,