Skip to content

Commit f8c2a7e

Browse files
committed
Rustfmt
1 parent 9fc56fb commit f8c2a7e

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

src/common.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,7 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
350350
pub(crate) fn anonymous_str(&mut self, msg: &str) -> Value {
351351
let mut data_ctx = DataContext::new();
352352
data_ctx.define(msg.as_bytes().to_vec().into_boxed_slice());
353-
let msg_id = self
354-
.module
355-
.declare_anonymous_data(false, false)
356-
.unwrap();
353+
let msg_id = self.module.declare_anonymous_data(false, false).unwrap();
357354

358355
// Ignore DuplicateDefinition error, as the data will be the same
359356
let _ = self.module.define_data(msg_id, &data_ctx);

src/driver/aot.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,8 @@ fn reuse_workproduct_for_cgu(
7373
let mut object = None;
7474
let work_product = cgu.work_product(tcx);
7575
if let Some(saved_file) = &work_product.saved_file {
76-
let obj_out = tcx
77-
.output_filenames(())
78-
.temp_path(OutputType::Object, Some(&cgu.name().as_str()));
76+
let obj_out =
77+
tcx.output_filenames(()).temp_path(OutputType::Object, Some(&cgu.name().as_str()));
7978
object = Some(obj_out.clone());
8079
let source_file = rustc_incremental::in_incr_comp_dir(&incr_comp_session_dir, &saved_file);
8180
if let Err(err) = rustc_fs_util::link_or_copy(&source_file, &obj_out) {
@@ -281,9 +280,8 @@ pub(crate) fn run_aot(
281280
.as_str()
282281
.to_string();
283282

284-
let tmp_file = tcx
285-
.output_filenames(())
286-
.temp_path(OutputType::Metadata, Some(&metadata_cgu_name));
283+
let tmp_file =
284+
tcx.output_filenames(()).temp_path(OutputType::Metadata, Some(&metadata_cgu_name));
287285

288286
let obj = crate::backend::with_object(tcx.sess, &metadata_cgu_name, |object| {
289287
crate::metadata::write_metadata(tcx, object);
@@ -358,8 +356,7 @@ fn codegen_global_asm(tcx: TyCtxt<'_>, cgu_name: &str, global_asm: &str) {
358356
.collect::<Vec<_>>()
359357
.join("\n");
360358

361-
let output_object_file =
362-
tcx.output_filenames(()).temp_path(OutputType::Object, Some(cgu_name));
359+
let output_object_file = tcx.output_filenames(()).temp_path(OutputType::Object, Some(cgu_name));
363360

364361
// Assemble `global_asm`
365362
let global_asm_object_file = add_file_stem_postfix(output_object_file.clone(), ".asm");

0 commit comments

Comments
 (0)