Skip to content

Commit

Permalink
Don't check RPITITs that are Self:Sized for PointerLike
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Dec 10, 2024
1 parent a7fa4cb commit b482339
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,11 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
continue;
}

// RPITITs with `Self: Sized` don't need to be checked.
if tcx.generics_require_sized_self(assoc_item) {
continue;
}

let pointer_like_goal = pointer_like_goal_for_rpitit(
tcx,
supertrait,
Expand Down

0 comments on commit b482339

Please sign in to comment.