Skip to content

Commit 0564de1

Browse files
committed
remove some redundant clones
1 parent 5701093 commit 0564de1

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

compiler/rustc_borrowck/src/diagnostics/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
12041204
};
12051205
err.multipart_suggestion_verbose(
12061206
msg,
1207-
sugg.clone(),
1207+
sugg,
12081208
Applicability::MaybeIncorrect,
12091209
);
12101210
for error in errors {

compiler/rustc_middle/src/ty/consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl<'tcx> IntoKind for Const<'tcx> {
3030
type Kind = ConstKind<'tcx>;
3131

3232
fn kind(self) -> ConstKind<'tcx> {
33-
self.kind().clone()
33+
self.kind()
3434
}
3535
}
3636

compiler/rustc_resolve/src/imports.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
10021002
UNUSED_IMPORTS,
10031003
id,
10041004
import.span,
1005-
msg.to_string(),
1005+
msg,
10061006
BuiltinLintDiagnostics::RedundantImportVisibility {
10071007
max_vis: max_vis.to_string(def_id, self.tcx),
10081008
span: import.span,

compiler/stable_mir/src/target.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub struct MachineInfo {
1111

1212
impl MachineInfo {
1313
pub fn target() -> MachineInfo {
14-
with(|cx| cx.target_info().clone())
14+
with(|cx| cx.target_info())
1515
}
1616

1717
pub fn target_endianess() -> Endian {

0 commit comments

Comments
 (0)