Avoid an ICE in diagnostics
This commit is contained in:
parent
09d73fab08
commit
d3a89cd214
3 changed files with 35 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue