Skip to content

Commit b09420f

Browse files
committed
Drive by: handle references in same_type_modulo_infer
1 parent 1c85987 commit b09420f

File tree

1 file changed

+3
-0
lines changed
  • compiler/rustc_infer/src/infer/error_reporting

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,9 @@ pub fn same_type_modulo_infer<'tcx>(a: Ty<'tcx>, b: Ty<'tcx>) -> bool {
333333
)
334334
| (&ty::Infer(ty::InferTy::TyVar(_)), _)
335335
| (_, &ty::Infer(ty::InferTy::TyVar(_))) => true,
336+
(&ty::Ref(reg_a, ty_a, mut_a), &ty::Ref(reg_b, ty_b, mut_b)) => {
337+
reg_a == reg_b && mut_a == mut_b && same_type_modulo_infer(ty_a, ty_b)
338+
}
336339
_ => a == b,
337340
}
338341
}

0 commit comments

Comments
 (0)