diff options
| author | Jubilee <workingjubilee@gmail.com> | 2024-10-29 03:11:39 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-29 03:11:39 -0700 |
| commit | 5d0f52efa4b774ffa066d0f40a22242dc7fbbfba (patch) | |
| tree | 862aa592e7c55bc4188a2a9a1d3c10bf8c083289 /compiler/rustc_errors/src/json.rs | |
| parent | 2df8dbb1b37168c59eca2884502a1b79892858a9 (diff) | |
| parent | 746b675c5aabc7a61443f16a37223720657544d2 (diff) | |
| download | rust-5d0f52efa4b774ffa066d0f40a22242dc7fbbfba.tar.gz rust-5d0f52efa4b774ffa066d0f40a22242dc7fbbfba.zip | |
Rollup merge of #131375 - klensy:clone_on_ref_ptr, r=cjgillot
compiler: apply clippy::clone_on_ref_ptr for CI Apply lint https://rust-lang.github.io/rust-clippy/master/index.html#/clone_on_ref_ptr for compiler, also see https://github.com/rust-lang/rust/pull/131225#discussion_r1790109443. Some Arc's can be misplaced with Lrc's, sorry. https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/enable.20more.20clippy.20lints.20for.20compiler.20.28and.5Cor.20std.29
Diffstat (limited to 'compiler/rustc_errors/src/json.rs')
| -rw-r--r-- | compiler/rustc_errors/src/json.rs | 4 |
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) |
