Rollup merge of #125054 - nnethercote:fix-124973, r=compiler-errors
Handle `ReVar` in `note_and_explain_region` PR #124918 made this path abort. The added test, from fuzzing, identified that it is reachable. r? `@lcnr`
This commit is contained in:
commit
72fd85c617
3 changed files with 25 additions and 1 deletions
|
@ -173,7 +173,10 @@ pub(super) fn note_and_explain_region<'tcx>(
|
|||
|
||||
ty::ReError(_) => return,
|
||||
|
||||
ty::ReVar(_) | ty::ReBound(..) | ty::ReErased => {
|
||||
// FIXME(#125431): `ReVar` shouldn't reach here.
|
||||
ty::ReVar(_) => (format!("lifetime `{region}`"), alt_span),
|
||||
|
||||
ty::ReBound(..) | ty::ReErased => {
|
||||
bug!("unexpected region for note_and_explain_region: {:?}", region);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue