about summary refs log tree commit diff
path: root/compiler/rustc_lint/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-12-18 14:25:55 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2022-12-18 14:25:55 +0100
commitfec9e9ecf1a34aa87bcae28c158a590f75e16a7d (patch)
treec17c5bf75a035be95b9fa2166308dd39a6d76a3c /compiler/rustc_lint/src
parent35a99eef32a2b7b9d8e77dde539f869e522d181f (diff)
downloadrust-fec9e9ecf1a34aa87bcae28c158a590f75e16a7d.tar.gz
rust-fec9e9ecf1a34aa87bcae28c158a590f75e16a7d.zip
don't clone Copy types
Diffstat (limited to 'compiler/rustc_lint/src')
-rw-r--r--compiler/rustc_lint/src/builtin.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs
index 43862570e80..cd19e65b6fc 100644
--- a/compiler/rustc_lint/src/builtin.rs
+++ b/compiler/rustc_lint/src/builtin.rs
@@ -270,7 +270,7 @@ impl<'tcx> LateLintPass<'tcx> for NonShorthandFieldPatterns {
                             |lint| {
                                 let suggested_ident =
                                     format!("{}{}", binding_annot.prefix_str(), ident);
-                                lint.set_arg("ident", ident.clone()).span_suggestion(
+                                lint.set_arg("ident", ident).span_suggestion(
                                     fieldpat.span,
                                     fluent::suggestion,
                                     suggested_ident,
@@ -2052,7 +2052,7 @@ impl KeywordIdents {
             ident.span,
             fluent::lint_builtin_keyword_idents,
             |lint| {
-                lint.set_arg("kw", ident.clone()).set_arg("next", next_edition).span_suggestion(
+                lint.set_arg("kw", ident).set_arg("next", next_edition).span_suggestion(
                     ident.span,
                     fluent::suggestion,
                     format!("r#{}", ident),