Skip to content

Commit de4fce8

Browse files
committed
Auto merge of rust-lang#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
2 parents 9162bbf + 69a4a46 commit de4fce8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clippy_config/src/msrvs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ msrv_aliases! {
2323
1,70,0 { OPTION_RESULT_IS_VARIANT_AND, BINARY_HEAP_RETAIN }
2424
1,68,0 { PATH_MAIN_SEPARATOR_STR }
2525
1,65,0 { LET_ELSE, POINTER_CAST_CONSTNESS }
26-
1,63,0 { ASSIGNING_CLONES }
26+
1,63,0 { CLONE_INTO }
2727
1,62,0 { BOOL_THEN_SOME, DEFAULT_ENUM_ATTRIBUTE }
2828
1,59,0 { THREAD_LOCAL_INITIALIZER_CAN_BE_MADE_CONST }
2929
1,58,0 { FORMAT_ARGS_CAPTURE, PATTERN_TRAIT_CHAR_ARRAY }

clippy_lints/src/assigning_clones.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ fn extract_call<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> Option<
153153
fn is_ok_to_suggest<'tcx>(cx: &LateContext<'tcx>, lhs: &Expr<'tcx>, call: &CallCandidate<'tcx>, msrv: &Msrv) -> bool {
154154
// For calls to .to_owned we suggest using .clone_into(), which was only stablilized in 1.63.
155155
// If the current MSRV is below that, don't suggest the lint.
156-
if !msrv.meets(msrvs::ASSIGNING_CLONES) && matches!(call.target, TargetTrait::ToOwned) {
156+
if !msrv.meets(msrvs::CLONE_INTO) && matches!(call.target, TargetTrait::ToOwned) {
157157
return false;
158158
}
159159

0 commit comments

Comments
 (0)