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 | 7307dc0ca1c04814517f2afe57b8aa12b2f9960b (patch) | |
| tree | a7b26524daa68649891f716a4bc0e4b33bfd8bf4 /src/tools | |
| parent | 07b7dc90ee4df5815dbb91ef8e98cb93571230f5 (diff) | |
| parent | 2ae048e1df765e0ba4c9638149552ea1eba82834 (diff) | |
| download | rust-7307dc0ca1c04814517f2afe57b8aa12b2f9960b.tar.gz rust-7307dc0ca1c04814517f2afe57b8aa12b2f9960b.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.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/needless_borrows_for_generic_args.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/clippy/clippy_lints/src/needless_borrows_for_generic_args.rs b/src/tools/clippy/clippy_lints/src/needless_borrows_for_generic_args.rs index 17d251a7bbb..120a4b98a65 100644 --- a/src/tools/clippy/clippy_lints/src/needless_borrows_for_generic_args.rs +++ b/src/tools/clippy/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); |
