Skip to content

Commit e963568

Browse files
committed
cleanup: don't .into() identical types
1 parent 9903b25 commit e963568

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

compiler/rustc_const_eval/src/interpret/intrinsics.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -396,11 +396,8 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
396396

397397
for i in 0..dest_len {
398398
let place = self.project_index(&dest, i)?;
399-
let value = if i == index {
400-
elem.clone()
401-
} else {
402-
self.project_index(&input, i)?.into()
403-
};
399+
let value =
400+
if i == index { elem.clone() } else { self.project_index(&input, i)? };
404401
self.copy_op(&value, &place)?;
405402
}
406403
}

compiler/rustc_interface/src/interface.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se
427427
Err(e) => early_dcx.early_fatal(format!("failed to load fluent bundle: {e}")),
428428
};
429429

430-
let mut locale_resources = Vec::from(config.locale_resources);
430+
let mut locale_resources = config.locale_resources;
431431
locale_resources.push(codegen_backend.locale_resource());
432432

433433
let mut sess = rustc_session::build_session(

compiler/rustc_lint/src/if_let_rescope.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ impl Subdiagnostic for IfLetRescopeRewrite {
304304
.chain(repeat('}').take(closing_brackets.count))
305305
.collect(),
306306
));
307-
let msg = f(diag, crate::fluent_generated::lint_suggestion.into());
307+
let msg = f(diag, crate::fluent_generated::lint_suggestion);
308308
diag.multipart_suggestion_with_style(
309309
msg,
310310
suggestions,

0 commit comments

Comments
 (0)