Rollup merge of #144694 - compiler-errors:with-self-ty, r=SparrowLii
Distinguish prepending and replacing self ty in predicates There are two kinds of functions called `with_self_ty`: 1. Prepends the `Self` type onto an `ExistentialPredicate` which lacks it in its internal representation. 2. Replaces the `Self` type of an existing predicate, either for diagnostics purposes or in the new trait solver when normalizing that self type. This PR distinguishes these two because I often want to only grep for one of them. Namely, let's call it `with_replaced_self_ty` when all we're doing is replacing the self type.
This commit is contained in:
@@ -493,7 +493,7 @@ fn suggestion_signature<'tcx>(
|
||||
let args = ty::GenericArgs::identity_for_item(tcx, assoc.def_id).rebase_onto(
|
||||
tcx,
|
||||
assoc.container_id(tcx),
|
||||
impl_trait_ref.with_self_ty(tcx, tcx.types.self_param).args,
|
||||
impl_trait_ref.with_replaced_self_ty(tcx, tcx.types.self_param).args,
|
||||
);
|
||||
|
||||
match assoc.kind {
|
||||
|
||||
Reference in New Issue
Block a user