diff options
| author | bors <bors@rust-lang.org> | 2023-03-31 23:15:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-03-31 23:15:52 +0000 |
| commit | fadf164d8dc41116f936fb9b151b8083939a4a7d (patch) | |
| tree | 2ce16df93b98a42d50073a86431df55c7ba25d9f /compiler/rustc_infer | |
| parent | 5e1d3299a290026b85787bc9c7e72bcc53ac283f (diff) | |
| parent | a42cbdb16575d5c955e9bd3b434026758de789bf (diff) | |
| download | rust-fadf164d8dc41116f936fb9b151b8083939a4a7d.tar.gz rust-fadf164d8dc41116f936fb9b151b8083939a4a7d.zip | |
Auto merge of #109165 - aliemjay:fix-ice-annotation, r=davidtwco
allow ReError in CanonicalUserTypeAnnotation Why not? we already allow `TyKind::Error`. Fixes #109072.
Diffstat (limited to 'compiler/rustc_infer')
| -rw-r--r-- | compiler/rustc_infer/src/infer/canonical/canonicalizer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs b/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs index 96a5f6532fe..3bbd01f8273 100644 --- a/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs +++ b/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs @@ -230,9 +230,9 @@ impl CanonicalizeMode for CanonicalizeUserTypeAnnotation { r: ty::Region<'tcx>, ) -> ty::Region<'tcx> { match *r { - ty::ReEarlyBound(_) | ty::ReFree(_) | ty::ReErased | ty::ReStatic => r, + ty::ReEarlyBound(_) | ty::ReFree(_) | ty::ReErased | ty::ReStatic | ty::ReError(_) => r, ty::ReVar(_) => canonicalizer.canonical_var_for_region_in_root_universe(r), - _ => { + ty::RePlaceholder(..) | ty::ReLateBound(..) => { // We only expect region names that the user can type. bug!("unexpected region in query response: `{:?}`", r) } |
