Rollup merge of #101022 - compiler-errors:issue-101020, r=jackh726
Erase late bound regions before comparing types in `suggest_dereferences` Fixes #101020
This commit is contained in:
commit
1ea84961e8
4 changed files with 74 additions and 5 deletions
|
@ -2725,7 +2725,10 @@ impl<'tcx> TypeRelation<'tcx> for SameTypeModuloInfer<'_, 'tcx> {
|
|||
a: ty::Region<'tcx>,
|
||||
b: 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)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue