Skip to content

Commit

Permalink
skip binder before erasing.
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jun 28, 2022
1 parent baf382e commit d25d79d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions compiler/rustc_infer/src/infer/outlives/test_type_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ pub(super) fn can_match_erased_ty<'tcx>(
erased_ty: Ty<'tcx>,
) -> bool {
assert!(!outlives_predicate.has_escaping_bound_vars());
let erased_outlives_predicate = tcx.erase_regions(outlives_predicate);
let outlives_ty = erased_outlives_predicate.skip_binder().0;
let outlives_ty = tcx.erase_regions(outlives_predicate.skip_binder().0);
if outlives_ty == erased_ty {
// pointless micro-optimization
true
Expand Down

0 comments on commit d25d79d

Please sign in to comment.