about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-04-25 07:42:03 +0000
committerbors <bors@rust-lang.org>2024-04-25 07:42:03 +0000
commitde4fce8686f5a55547c20215fdf01c5dae2b2c97 (patch)
tree66bc9ed1e5558e93d0cd85ed35c130539cd615cb
parent9162bbf5acc8e0e914f07904167a3d1b6f0d2cbe (diff)
parent69a4a46631c084a2fa863f71447d0547339a4c0d (diff)
downloadrust-de4fce8686f5a55547c20215fdf01c5dae2b2c97.tar.gz
rust-de4fce8686f5a55547c20215fdf01c5dae2b2c97.zip
Auto merge of #12711 - Alexendoo:assigning-clones-msrv, r=Manishearth
Rename `msrvs::ASSIGNING_CLONES` to `msrvs::CLONE_INTO`

A nit I missed in the PR that added it

changelog: none
-rw-r--r--clippy_config/src/msrvs.rs2
-rw-r--r--clippy_lints/src/assigning_clones.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/clippy_config/src/msrvs.rs b/clippy_config/src/msrvs.rs
index 59dd5b334b8..14808440d48 100644
--- a/clippy_config/src/msrvs.rs
+++ b/clippy_config/src/msrvs.rs
@@ -23,7 +23,7 @@ msrv_aliases! {
     1,70,0 { OPTION_RESULT_IS_VARIANT_AND, BINARY_HEAP_RETAIN }
     1,68,0 { PATH_MAIN_SEPARATOR_STR }
     1,65,0 { LET_ELSE, POINTER_CAST_CONSTNESS }
-    1,63,0 { ASSIGNING_CLONES }
+    1,63,0 { CLONE_INTO }
     1,62,0 { BOOL_THEN_SOME, DEFAULT_ENUM_ATTRIBUTE }
     1,59,0 { THREAD_LOCAL_INITIALIZER_CAN_BE_MADE_CONST }
     1,58,0 { FORMAT_ARGS_CAPTURE, PATTERN_TRAIT_CHAR_ARRAY }
diff --git a/clippy_lints/src/assigning_clones.rs b/clippy_lints/src/assigning_clones.rs
index dc7f44af2b7..d88ca84fb97 100644
--- a/clippy_lints/src/assigning_clones.rs
+++ b/clippy_lints/src/assigning_clones.rs
@@ -153,7 +153,7 @@ fn extract_call<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> Option<
 fn is_ok_to_suggest<'tcx>(cx: &LateContext<'tcx>, lhs: &Expr<'tcx>, call: &CallCandidate<'tcx>, msrv: &Msrv) -> bool {
     // For calls to .to_owned we suggest using .clone_into(), which was only stablilized in 1.63.
     // If the current MSRV is below that, don't suggest the lint.
-    if !msrv.meets(msrvs::ASSIGNING_CLONES) && matches!(call.target, TargetTrait::ToOwned) {
+    if !msrv.meets(msrvs::CLONE_INTO) && matches!(call.target, TargetTrait::ToOwned) {
         return false;
     }