diff options
Diffstat (limited to 'compiler/rustc_middle/src/infer/unify_key.rs')
-rw-r--r-- | compiler/rustc_middle/src/infer/unify_key.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rustc_middle/src/infer/unify_key.rs b/compiler/rustc_middle/src/infer/unify_key.rs index 041a63776..6e50e8940 100644 --- a/compiler/rustc_middle/src/infer/unify_key.rs +++ b/compiler/rustc_middle/src/infer/unify_key.rs @@ -58,18 +58,17 @@ impl<'tcx> UnifyValue for UnifiedRegion<'tcx> { fn unify_values(value1: &Self, value2: &Self) -> Result<Self, NoError> { // We pick the value of the least universe because it is compatible with more variables. - // This is *not* necessary for soundness, but it allows more region variables to be - // resolved to the said value. + // This is *not* necessary for completeness. #[cold] fn min_universe<'tcx>(r1: Region<'tcx>, r2: Region<'tcx>) -> Region<'tcx> { cmp::min_by_key(r1, r2, |r| match r.kind() { ty::ReStatic | ty::ReErased - | ty::ReFree(..) - | ty::ReEarlyBound(..) + | ty::ReLateParam(..) + | ty::ReEarlyParam(..) | ty::ReError(_) => ty::UniverseIndex::ROOT, ty::RePlaceholder(placeholder) => placeholder.universe, - ty::ReVar(..) | ty::ReLateBound(..) => bug!("not a universal region"), + ty::ReVar(..) | ty::ReBound(..) => bug!("not a universal region"), }) } |