Skip to content

Commit

Permalink
remove some redundant clones
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Dec 11, 2023
1 parent 5701093 commit 0564de1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/diagnostics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
};
err.multipart_suggestion_verbose(
msg,
sugg.clone(),
sugg,
Applicability::MaybeIncorrect,
);
for error in errors {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl<'tcx> IntoKind for Const<'tcx> {
type Kind = ConstKind<'tcx>;

fn kind(self) -> ConstKind<'tcx> {
self.kind().clone()
self.kind()
}
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_resolve/src/imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
UNUSED_IMPORTS,
id,
import.span,
msg.to_string(),
msg,
BuiltinLintDiagnostics::RedundantImportVisibility {
max_vis: max_vis.to_string(def_id, self.tcx),
span: import.span,
Expand Down
2 changes: 1 addition & 1 deletion compiler/stable_mir/src/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub struct MachineInfo {

impl MachineInfo {
pub fn target() -> MachineInfo {
with(|cx| cx.target_info().clone())
with(|cx| cx.target_info())
}

pub fn target_endianess() -> Endian {
Expand Down

0 comments on commit 0564de1

Please sign in to comment.