about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/json.rs
diff options
context:
space:
mode:
authorklensy <klensy@users.noreply.github.com>2024-10-07 22:22:51 +0300
committerklensy <klensy@users.noreply.github.com>2024-10-28 18:05:08 +0300
commit746b675c5aabc7a61443f16a37223720657544d2 (patch)
tree63d9413addb96e2884e62e2a7deb01baab84fc37 /compiler/rustc_errors/src/json.rs
parent0bff99403c03b891995976587e3c92cbf04ded4c (diff)
downloadrust-746b675c5aabc7a61443f16a37223720657544d2.tar.gz
rust-746b675c5aabc7a61443f16a37223720657544d2.zip
fix clippy::clone_on_ref_ptr for compiler
Diffstat (limited to 'compiler/rustc_errors/src/json.rs')
-rw-r--r--compiler/rustc_errors/src/json.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_errors/src/json.rs b/compiler/rustc_errors/src/json.rs
index 1534e256520..91e2b9996cd 100644
--- a/compiler/rustc_errors/src/json.rs
+++ b/compiler/rustc_errors/src/json.rs
@@ -367,9 +367,9 @@ impl Diagnostic {
             ColorConfig::Always | ColorConfig::Auto => dst = Box::new(termcolor::Ansi::new(dst)),
             ColorConfig::Never => {}
         }
-        HumanEmitter::new(dst, je.fallback_bundle.clone())
+        HumanEmitter::new(dst, Lrc::clone(&je.fallback_bundle))
             .short_message(short)
-            .sm(Some(je.sm.clone()))
+            .sm(Some(Lrc::clone(&je.sm)))
             .fluent_bundle(je.fluent_bundle.clone())
             .diagnostic_width(je.diagnostic_width)
             .macro_backtrace(je.macro_backtrace)