Skip to content

Commit 5bf05c1

Browse files
committed
Auto merge of rust-lang#136751 - bjorn3:update_rustfmt, r=Mark-Simulacrum
Update bootstrap compiler and rustfmt The rustfmt version we previously used formats things differently from what the latest nightly rustfmt does. This causes issues for subtrees that get formatted both in-tree and in their own repo. Updating the rustfmt used in-tree solves those issues. Also bumped the bootstrap compiler as the stage0 update command always updates both at the same time.
2 parents 01f1025 + 180f350 commit 5bf05c1

File tree

3 files changed

+259
-250
lines changed

3 files changed

+259
-250
lines changed

src/builder.rs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,11 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
155155
// NOTE: not sure why, but we have the wrong type here.
156156
let int_type = compare_exchange.get_param(2).to_rvalue().get_type();
157157
let src = self.context.new_bitcast(self.location, src, int_type);
158-
self.context.new_call(self.location, compare_exchange, &[
159-
dst,
160-
expected,
161-
src,
162-
weak,
163-
order,
164-
failure_order,
165-
])
158+
self.context.new_call(
159+
self.location,
160+
compare_exchange,
161+
&[dst, expected, src, weak, order, failure_order],
162+
)
166163
}
167164

168165
pub fn assign(&self, lvalue: LValue<'gcc>, value: RValue<'gcc>) {
@@ -1076,9 +1073,11 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
10761073
let align = dest.val.align.restrict_for_offset(dest.layout.field(self.cx(), 0).size);
10771074
cg_elem.val.store(self, PlaceRef::new_sized_aligned(current_val, cg_elem.layout, align));
10781075

1079-
let next = self.inbounds_gep(self.backend_type(cg_elem.layout), current.to_rvalue(), &[
1080-
self.const_usize(1),
1081-
]);
1076+
let next = self.inbounds_gep(
1077+
self.backend_type(cg_elem.layout),
1078+
current.to_rvalue(),
1079+
&[self.const_usize(1)],
1080+
);
10821081
self.llbb().add_assignment(self.location, current, next);
10831082
self.br(header_bb);
10841083

src/intrinsic/llvm.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -687,11 +687,12 @@ pub fn adjust_intrinsic_return_value<'a, 'gcc, 'tcx>(
687687
let field2 = builder.context.new_field(None, args[1].get_type(), "carryResult");
688688
let struct_type =
689689
builder.context.new_struct_type(None, "addcarryResult", &[field1, field2]);
690-
return_value =
691-
builder.context.new_struct_constructor(None, struct_type.as_type(), None, &[
692-
return_value,
693-
last_arg.dereference(None).to_rvalue(),
694-
]);
690+
return_value = builder.context.new_struct_constructor(
691+
None,
692+
struct_type.as_type(),
693+
None,
694+
&[return_value, last_arg.dereference(None).to_rvalue()],
695+
);
695696
}
696697
}
697698
"__builtin_ia32_stmxcsr" => {
@@ -716,11 +717,12 @@ pub fn adjust_intrinsic_return_value<'a, 'gcc, 'tcx>(
716717
let field2 = builder.context.new_field(None, return_value.get_type(), "success");
717718
let struct_type =
718719
builder.context.new_struct_type(None, "rdrand_result", &[field1, field2]);
719-
return_value =
720-
builder.context.new_struct_constructor(None, struct_type.as_type(), None, &[
721-
random_number,
722-
success_variable.to_rvalue(),
723-
]);
720+
return_value = builder.context.new_struct_constructor(
721+
None,
722+
struct_type.as_type(),
723+
None,
724+
&[random_number, success_variable.to_rvalue()],
725+
);
724726
}
725727
"fma" => {
726728
let f16_type = builder.context.new_c_type(CType::Float16);

0 commit comments

Comments
 (0)