Rollup merge of #110835 - nnethercote:strict-region-folders-2, r=compiler-errors
Make some region folders a little stricter. Because certain regions cannot occur in them. r? ``@compiler-errors``
This commit is contained in:
commit
e47562c674
6 changed files with 27 additions and 23 deletions
|
@ -829,7 +829,13 @@ impl<'a, 'tcx> TypeFolder<TyCtxt<'tcx>> for SubstFolder<'a, 'tcx> {
|
|||
None => region_param_out_of_range(data, self.substs),
|
||||
}
|
||||
}
|
||||
_ => r,
|
||||
ty::ReLateBound(..)
|
||||
| ty::ReFree(_)
|
||||
| ty::ReStatic
|
||||
| ty::RePlaceholder(_)
|
||||
| ty::ReErased
|
||||
| ty::ReError(_) => r,
|
||||
ty::ReVar(_) => bug!("unexpected region: {r:?}"),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue