1
Fork 0

fix clippy::clone_on_ref_ptr for compiler

This commit is contained in:
klensy 2024-10-07 22:22:51 +03:00
parent 0bff99403c
commit 746b675c5a
33 changed files with 98 additions and 91 deletions

View file

@ -241,7 +241,7 @@ impl ParseSess {
let sm = Lrc::new(SourceMap::new(FilePathMapping::empty()));
let emitter = Box::new(
HumanEmitter::new(stderr_destination(ColorConfig::Auto), fallback_bundle)
.sm(Some(sm.clone())),
.sm(Some(Lrc::clone(&sm))),
);
let dcx = DiagCtxt::new(emitter);
ParseSess::with_dcx(dcx, sm)
@ -278,7 +278,7 @@ impl ParseSess {
let sm = Lrc::new(SourceMap::new(FilePathMapping::empty()));
let emitter = Box::new(HumanEmitter::new(
stderr_destination(ColorConfig::Auto),
fallback_bundle.clone(),
Lrc::clone(&fallback_bundle),
));
let fatal_dcx = DiagCtxt::new(emitter);
let dcx = DiagCtxt::new(Box::new(SilentEmitter {
@ -297,7 +297,7 @@ impl ParseSess {
}
pub fn clone_source_map(&self) -> Lrc<SourceMap> {
self.source_map.clone()
Lrc::clone(&self.source_map)
}
pub fn buffer_lint(