mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
cleanup: don't .into()
identical types
This commit is contained in:
parent
9903b256a2
commit
e963568585
@ -396,11 +396,8 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
|
|||||||
|
|
||||||
for i in 0..dest_len {
|
for i in 0..dest_len {
|
||||||
let place = self.project_index(&dest, i)?;
|
let place = self.project_index(&dest, i)?;
|
||||||
let value = if i == index {
|
let value =
|
||||||
elem.clone()
|
if i == index { elem.clone() } else { self.project_index(&input, i)? };
|
||||||
} else {
|
|
||||||
self.project_index(&input, i)?.into()
|
|
||||||
};
|
|
||||||
self.copy_op(&value, &place)?;
|
self.copy_op(&value, &place)?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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}")),
|
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());
|
locale_resources.push(codegen_backend.locale_resource());
|
||||||
|
|
||||||
let mut sess = rustc_session::build_session(
|
let mut sess = rustc_session::build_session(
|
||||||
|
@ -304,7 +304,7 @@ impl Subdiagnostic for IfLetRescopeRewrite {
|
|||||||
.chain(repeat('}').take(closing_brackets.count))
|
.chain(repeat('}').take(closing_brackets.count))
|
||||||
.collect(),
|
.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(
|
diag.multipart_suggestion_with_style(
|
||||||
msg,
|
msg,
|
||||||
suggestions,
|
suggestions,
|
||||||
|
Loading…
Reference in New Issue
Block a user