Skip to content

Commit 48b3d8a

Browse files
Drive-by: same_type_modulo_infer should handle ReVar == ReVar
1 parent cfd47af commit 48b3d8a

File tree

1 file changed

+4
-1
lines changed
  • compiler/rustc_infer/src/infer/error_reporting

1 file changed

+4
-1
lines changed

compiler/rustc_infer/src/infer/error_reporting/mod.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -2720,7 +2720,10 @@ impl<'tcx> TypeRelation<'tcx> for SameTypeModuloInfer<'_, 'tcx> {
27202720
a: ty::Region<'tcx>,
27212721
b: ty::Region<'tcx>,
27222722
) -> RelateResult<'tcx, ty::Region<'tcx>> {
2723-
if (a.is_var() && b.is_free_or_static()) || (b.is_var() && a.is_free_or_static()) || a == b
2723+
if (a.is_var() && b.is_free_or_static())
2724+
|| (b.is_var() && a.is_free_or_static())
2725+
|| (a.is_var() && b.is_var())
2726+
|| a == b
27242727
{
27252728
Ok(a)
27262729
} else {

0 commit comments

Comments
 (0)