Skip to content

Commit

Permalink
Rollup merge of #118840 - matthiaskrgr:cloooooone, r=compiler-errors
Browse files Browse the repository at this point in the history
remove some redundant clones
  • Loading branch information
matthiaskrgr authored Dec 12, 2023
2 parents b862e7e + 0564de1 commit fefa8fc
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 fefa8fc

Please sign in to comment.