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
This commit is contained in:
commit
5d0f52efa4
34 changed files with 100 additions and 92 deletions
|
@ -1694,9 +1694,9 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
|
|||
|
||||
fn dummy_ext(&self, macro_kind: MacroKind) -> Lrc<SyntaxExtension> {
|
||||
match macro_kind {
|
||||
MacroKind::Bang => self.dummy_ext_bang.clone(),
|
||||
MacroKind::Derive => self.dummy_ext_derive.clone(),
|
||||
MacroKind::Attr => self.non_macro_attr.ext.clone(),
|
||||
MacroKind::Bang => Lrc::clone(&self.dummy_ext_bang),
|
||||
MacroKind::Derive => Lrc::clone(&self.dummy_ext_derive),
|
||||
MacroKind::Attr => Lrc::clone(&self.non_macro_attr.ext),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -826,7 +826,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
|
|||
}
|
||||
_ => None,
|
||||
},
|
||||
None => self.get_macro(res).map(|macro_data| macro_data.ext.clone()),
|
||||
None => self.get_macro(res).map(|macro_data| Lrc::clone(¯o_data.ext)),
|
||||
};
|
||||
Ok((ext, res))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue