about summary refs log tree commit diff
path: root/clippy_utils
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2024-03-07 17:19:29 +0100
committerPhilipp Krones <hello@philkrones.com>2024-03-07 17:19:29 +0100
commit7e83df40685907ea917813ec5b13fea360bdc070 (patch)
tree477754a09b8ec72867209d71ac578b3a9071a413 /clippy_utils
parent0901b9fecf32c7dd84c83c454d30cbce11cbf2ea (diff)
downloadrust-7e83df40685907ea917813ec5b13fea360bdc070.tar.gz
rust-7e83df40685907ea917813ec5b13fea360bdc070.zip
Merge commit '93f0a9a91f58c9b2153868f458402155fb6265bb' into clippy-subtree-update
Diffstat (limited to 'clippy_utils')
-rw-r--r--clippy_utils/src/paths.rs1
-rw-r--r--clippy_utils/src/sugg.rs2
2 files changed, 1 insertions, 2 deletions
diff --git a/clippy_utils/src/paths.rs b/clippy_utils/src/paths.rs
index 2f728b62754..987f28192a8 100644
--- a/clippy_utils/src/paths.rs
+++ b/clippy_utils/src/paths.rs
@@ -115,4 +115,3 @@ pub const OPTION_UNWRAP: [&str; 4] = ["core", "option", "Option", "unwrap"];
 pub const OPTION_EXPECT: [&str; 4] = ["core", "option", "Option", "expect"];
 #[expect(clippy::invalid_paths)] // not sure why it thinks this, it works so
 pub const BOOL_THEN: [&str; 4] = ["core", "bool", "<impl bool>", "then"];
-pub const ALLOCATOR_GLOBAL: [&str; 3] = ["alloc", "alloc", "Global"];
diff --git a/clippy_utils/src/sugg.rs b/clippy_utils/src/sugg.rs
index e74621a0fbb..5090d0bd98b 100644
--- a/clippy_utils/src/sugg.rs
+++ b/clippy_utils/src/sugg.rs
@@ -995,7 +995,7 @@ impl<'tcx> Delegate<'tcx> for DerefDelegate<'_, 'tcx> {
                         // no adjustment needed here, as field projections are handled by the compiler
                         ProjectionKind::Field(..) => match cmt.place.ty_before_projection(i).kind() {
                             ty::Adt(..) | ty::Tuple(_) => {
-                                replacement_str = ident_str_with_proj.clone();
+                                replacement_str.clone_from(&ident_str_with_proj);
                                 projections_handled = true;
                             },
                             _ => (),