Rollup merge of #121020 - oli-obk:diagnostics_ice, r=davidtwco
Avoid an ICE in diagnostics fixes #121004 just a slice usage in diagnostics code. Sadly we can't yet bubble the `ErrorGuaranteed` from wf check to borrowck for these cases, as that causes cycle errors iirc
This commit is contained in:
commit
e5a743c4c2
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