Rollup merge of #111573 - compiler-errors:erase-re-error, r=WaffleLapkin
Erase `ReError` properly Fixes #111341 Since we check whether a type has free regions before erasing (to short circuit unnecesary folding), we need to consider `ReError` as a free region, or else we'll skip it when erasing a type that only mentions `ReError`. cc `@nnethercote`
This commit is contained in:
commit
6dc365003b
3 changed files with 50 additions and 1 deletions
|
@ -1708,7 +1708,9 @@ impl<'tcx> Region<'tcx> {
|
|||
ty::ReErased => {
|
||||
flags = flags | TypeFlags::HAS_RE_ERASED;
|
||||
}
|
||||
ty::ReError(_) => {}
|
||||
ty::ReError(_) => {
|
||||
flags = flags | TypeFlags::HAS_FREE_REGIONS;
|
||||
}
|
||||
}
|
||||
|
||||
debug!("type_flags({:?}) = {:?}", self, flags);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue