diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-09-29 16:51:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-29 16:51:55 +0200 |
| commit | 128a7d64f89c26f88d750ce0d9bae13c5f2dcc8e (patch) | |
| tree | 0d128256f0c7db3169ff1d0f1f3157b84f0bab89 | |
| parent | 4bb92599daad2ff825dd56a374fc11d7344852ad (diff) | |
| parent | e9635685859626cc4ea252eac65beef0f6066e68 (diff) | |
| download | rust-128a7d64f89c26f88d750ce0d9bae13c5f2dcc8e.tar.gz rust-128a7d64f89c26f88d750ce0d9bae13c5f2dcc8e.zip | |
Rollup merge of #131011 - matthiaskrgr:no_into, r=jieyouxu
cleanup: don't `.into()` identical types
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/intrinsics.rs | 7 | ||||
| -rw-r--r-- | compiler/rustc_interface/src/interface.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/if_let_rescope.rs | 2 |
3 files changed, 4 insertions, 7 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/intrinsics.rs b/compiler/rustc_const_eval/src/interpret/intrinsics.rs index e1fd8bea1f3..4c34ffc5d4e 100644 --- a/compiler/rustc_const_eval/src/interpret/intrinsics.rs +++ b/compiler/rustc_const_eval/src/interpret/intrinsics.rs @@ -396,11 +396,8 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { for i in 0..dest_len { let place = self.project_index(&dest, i)?; - let value = if i == index { - elem.clone() - } else { - self.project_index(&input, i)?.into() - }; + let value = + if i == index { elem.clone() } else { self.project_index(&input, i)? }; self.copy_op(&value, &place)?; } } diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs index c2241773c8c..3b8077bb3fc 100644 --- a/compiler/rustc_interface/src/interface.rs +++ b/compiler/rustc_interface/src/interface.rs @@ -427,7 +427,7 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se Err(e) => early_dcx.early_fatal(format!("failed to load fluent bundle: {e}")), }; - let mut locale_resources = Vec::from(config.locale_resources); + let mut locale_resources = config.locale_resources; locale_resources.push(codegen_backend.locale_resource()); let mut sess = rustc_session::build_session( diff --git a/compiler/rustc_lint/src/if_let_rescope.rs b/compiler/rustc_lint/src/if_let_rescope.rs index 229d0c36421..c6218fe1e74 100644 --- a/compiler/rustc_lint/src/if_let_rescope.rs +++ b/compiler/rustc_lint/src/if_let_rescope.rs @@ -304,7 +304,7 @@ impl Subdiagnostic for IfLetRescopeRewrite { .chain(repeat('}').take(closing_brackets.count)) .collect(), )); - let msg = f(diag, crate::fluent_generated::lint_suggestion.into()); + let msg = f(diag, crate::fluent_generated::lint_suggestion); diag.multipart_suggestion_with_style( msg, suggestions, |
