diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-12-11 21:54:36 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2023-12-11 21:54:36 +0100 |
| commit | 0564de10b1d4cd7340dfd8b91af2c88782af2a19 (patch) | |
| tree | 2b8a1c162a29d686637de9015469aba0960c5a68 | |
| parent | 57010939ed1d00076b4af0ed06a81ec69ea5e4a8 (diff) | |
| download | rust-0564de10b1d4cd7340dfd8b91af2c88782af2a19.tar.gz rust-0564de10b1d4cd7340dfd8b91af2c88782af2a19.zip | |
remove some redundant clones
| -rw-r--r-- | compiler/rustc_borrowck/src/diagnostics/mod.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/consts.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/imports.rs | 2 | ||||
| -rw-r--r-- | compiler/stable_mir/src/target.rs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/mod.rs b/compiler/rustc_borrowck/src/diagnostics/mod.rs index 1844e766a82..1616b5e99bf 100644 --- a/compiler/rustc_borrowck/src/diagnostics/mod.rs +++ b/compiler/rustc_borrowck/src/diagnostics/mod.rs @@ -1204,7 +1204,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> { }; err.multipart_suggestion_verbose( msg, - sugg.clone(), + sugg, Applicability::MaybeIncorrect, ); for error in errors { diff --git a/compiler/rustc_middle/src/ty/consts.rs b/compiler/rustc_middle/src/ty/consts.rs index 293df4f691d..07804f193b7 100644 --- a/compiler/rustc_middle/src/ty/consts.rs +++ b/compiler/rustc_middle/src/ty/consts.rs @@ -30,7 +30,7 @@ impl<'tcx> IntoKind for Const<'tcx> { type Kind = ConstKind<'tcx>; fn kind(self) -> ConstKind<'tcx> { - self.kind().clone() + self.kind() } } diff --git a/compiler/rustc_resolve/src/imports.rs b/compiler/rustc_resolve/src/imports.rs index c2306e3ea7d..e601ceaa50c 100644 --- a/compiler/rustc_resolve/src/imports.rs +++ b/compiler/rustc_resolve/src/imports.rs @@ -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, diff --git a/compiler/stable_mir/src/target.rs b/compiler/stable_mir/src/target.rs index bed1dbc4c00..41ec205cfc7 100644 --- a/compiler/stable_mir/src/target.rs +++ b/compiler/stable_mir/src/target.rs @@ -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 { |
