Rollup merge of #118840 - matthiaskrgr:cloooooone, r=compiler-errors

remove some redundant clones
This commit is contained in:
Matthias Krüger 2023-12-12 06:52:50 +01:00 committed by GitHub
commit fefa8fc6c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -1204,7 +1204,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
}; };
err.multipart_suggestion_verbose( err.multipart_suggestion_verbose(
msg, msg,
sugg.clone(), sugg,
Applicability::MaybeIncorrect, Applicability::MaybeIncorrect,
); );
for error in errors { for error in errors {

View File

@ -30,7 +30,7 @@ impl<'tcx> IntoKind for Const<'tcx> {
type Kind = ConstKind<'tcx>; type Kind = ConstKind<'tcx>;
fn kind(self) -> ConstKind<'tcx> { fn kind(self) -> ConstKind<'tcx> {
self.kind().clone() self.kind()
} }
} }

View File

@ -1002,7 +1002,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
UNUSED_IMPORTS, UNUSED_IMPORTS,
id, id,
import.span, import.span,
msg.to_string(), msg,
BuiltinLintDiagnostics::RedundantImportVisibility { BuiltinLintDiagnostics::RedundantImportVisibility {
max_vis: max_vis.to_string(def_id, self.tcx), max_vis: max_vis.to_string(def_id, self.tcx),
span: import.span, span: import.span,

View File

@ -11,7 +11,7 @@ pub struct MachineInfo {
impl MachineInfo { impl MachineInfo {
pub fn target() -> MachineInfo { pub fn target() -> MachineInfo {
with(|cx| cx.target_info().clone()) with(|cx| cx.target_info())
} }
pub fn target_endianess() -> Endian { pub fn target_endianess() -> Endian {