Skip to content

Commit ed363ac

Browse files
authored
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.
2 parents 1b39c35 + 7d662ee commit ed363ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/needless_borrows_for_generic_args.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ fn replace_types<'tcx>(
417417
{
418418
let projection = projection_predicate
419419
.projection_term
420-
.with_self_ty(cx.tcx, new_ty)
420+
.with_replaced_self_ty(cx.tcx, new_ty)
421421
.expect_ty(cx.tcx)
422422
.to_ty(cx.tcx);
423423

0 commit comments

Comments
 (0)