Rollup merge of #114355 - compiler-errors:resolve_vars_early, r=lcnr
resolve before canonicalization in new solver, ICE if unresolved Fold the values with a resolver before canonicalization instead of making it happen within canonicalization. This allows us to filter trivial region constraints from the external constraints. r? ``@lcnr``
This commit is contained in:
commit
d6f714e44f
6 changed files with 154 additions and 106 deletions
|
@ -562,15 +562,9 @@ impl<'cx, 'tcx> Canonicalizer<'cx, 'tcx> {
|
|||
V: TypeFoldable<TyCtxt<'tcx>>,
|
||||
{
|
||||
let needs_canonical_flags = if canonicalize_region_mode.any() {
|
||||
TypeFlags::HAS_INFER |
|
||||
TypeFlags::HAS_FREE_REGIONS | // `HAS_RE_PLACEHOLDER` implies `HAS_FREE_REGIONS`
|
||||
TypeFlags::HAS_TY_PLACEHOLDER |
|
||||
TypeFlags::HAS_CT_PLACEHOLDER
|
||||
TypeFlags::HAS_INFER | TypeFlags::HAS_PLACEHOLDER | TypeFlags::HAS_FREE_REGIONS
|
||||
} else {
|
||||
TypeFlags::HAS_INFER
|
||||
| TypeFlags::HAS_RE_PLACEHOLDER
|
||||
| TypeFlags::HAS_TY_PLACEHOLDER
|
||||
| TypeFlags::HAS_CT_PLACEHOLDER
|
||||
TypeFlags::HAS_INFER | TypeFlags::HAS_PLACEHOLDER
|
||||
};
|
||||
|
||||
// Fast path: nothing that needs to be canonicalized.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue