Drive-by: same_type_modulo_infer should handle ReVar == ReVar
This commit is contained in:
parent
cfd47afa19
commit
48b3d8aa82
1 changed files with 4 additions and 1 deletions
|
@ -2720,7 +2720,10 @@ impl<'tcx> TypeRelation<'tcx> for SameTypeModuloInfer<'_, 'tcx> {
|
||||||
a: ty::Region<'tcx>,
|
a: ty::Region<'tcx>,
|
||||||
b: ty::Region<'tcx>,
|
b: ty::Region<'tcx>,
|
||||||
) -> RelateResult<'tcx, ty::Region<'tcx>> {
|
) -> RelateResult<'tcx, ty::Region<'tcx>> {
|
||||||
if (a.is_var() && b.is_free_or_static()) || (b.is_var() && a.is_free_or_static()) || a == b
|
if (a.is_var() && b.is_free_or_static())
|
||||||
|
|| (b.is_var() && a.is_free_or_static())
|
||||||
|
|| (a.is_var() && b.is_var())
|
||||||
|
|| a == b
|
||||||
{
|
{
|
||||||
Ok(a)
|
Ok(a)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue