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
This commit is contained in:
commit
de4fce8686
2 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue