diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-12-12 06:52:50 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-12 06:52:50 +0100 |
| commit | fefa8fc6c4136fced5789152f5f07f06219b0a92 (patch) | |
| tree | d597fa670807d18ece933eb4f6d866f84f3fc9a3 | |
| parent | b862e7edce40d86e13d5a7e43930bfc9a06028cf (diff) | |
| parent | 0564de10b1d4cd7340dfd8b91af2c88782af2a19 (diff) | |
| download | rust-fefa8fc6c4136fced5789152f5f07f06219b0a92.tar.gz rust-fefa8fc6c4136fced5789152f5f07f06219b0a92.zip | |
Rollup merge of #118840 - matthiaskrgr:cloooooone, r=compiler-errors
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 { |
