diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-08-04 14:58:09 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-04 14:58:09 +1000 |
| commit | ed363ac523e80ff0f0ca66d1af2bcfd574d54fca (patch) | |
| tree | 45962c0812020097c9acf95699fc3c7062ecb01d | |
| parent | 1b39c3590c4d60fc4578dedfa779c7efbf60a17b (diff) | |
| parent | 7d662eeb935fae3a6c33670ef68ed12eba71fc88 (diff) | |
| download | rust-ed363ac523e80ff0f0ca66d1af2bcfd574d54fca.tar.gz rust-ed363ac523e80ff0f0ca66d1af2bcfd574d54fca.zip | |
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.
| -rw-r--r-- | clippy_lints/src/needless_borrows_for_generic_args.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/needless_borrows_for_generic_args.rs b/clippy_lints/src/needless_borrows_for_generic_args.rs index 17d251a7bbb..120a4b98a65 100644 --- a/clippy_lints/src/needless_borrows_for_generic_args.rs +++ b/clippy_lints/src/needless_borrows_for_generic_args.rs @@ -417,7 +417,7 @@ fn replace_types<'tcx>( { let projection = projection_predicate .projection_term - .with_self_ty(cx.tcx, new_ty) + .with_replaced_self_ty(cx.tcx, new_ty) .expect_ty(cx.tcx) .to_ty(cx.tcx); |
