Skip to content

Commit d25d79d

Browse files
committed
skip binder before erasing.
1 parent baf382e commit d25d79d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_infer/src/infer/outlives/test_type_match.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ pub(super) fn can_match_erased_ty<'tcx>(
7979
erased_ty: Ty<'tcx>,
8080
) -> bool {
8181
assert!(!outlives_predicate.has_escaping_bound_vars());
82-
let erased_outlives_predicate = tcx.erase_regions(outlives_predicate);
83-
let outlives_ty = erased_outlives_predicate.skip_binder().0;
82+
let outlives_ty = tcx.erase_regions(outlives_predicate.skip_binder().0);
8483
if outlives_ty == erased_ty {
8584
// pointless micro-optimization
8685
true

0 commit comments

Comments
 (0)