1
Fork 0

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:
Guillaume Gomez 2024-02-16 17:08:12 +01:00 committed by GitHub
commit e5a743c4c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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,