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 23:03:07 +0100
committerGitHub <noreply@github.com>2022-12-18 23:03:07 +0100
commit221e71e7a10e43f6e276a349ebad77208169593e (patch)
tree7152d87b4f23bd3338175ee9b5f850ed717c5c4f /compiler/rustc_lint/src
parente96166eb42676a7f5104939b69e94ab4306d0cb1 (diff)
parentfec9e9ecf1a34aa87bcae28c158a590f75e16a7d (diff)
downloadrust-221e71e7a10e43f6e276a349ebad77208169593e.tar.gz
rust-221e71e7a10e43f6e276a349ebad77208169593e.zip
Rollup merge of #105869 - matthiaskrgr:clone_on_copy, r=compiler-errors
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),