Skip to content

Commit 6b56dce

Browse files
committed
Fix tidy.
1 parent f9ff78b commit 6b56dce

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/librustc_codegen_ssa/mir/place.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,9 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
480480
let layout = cx.layout_of(self.monomorphize(&ty));
481481
match bx.tcx().const_eval(param_env.and(cid)) {
482482
Ok(val) => match val.val {
483-
ty::ConstKind::Value(mir::interpret::ConstValue::ByRef { alloc, offset }) => {
483+
ty::ConstKind::Value(mir::interpret::ConstValue::ByRef {
484+
alloc, offset
485+
}) => {
484486
bx.cx().from_const_alloc(layout, alloc, offset)
485487
}
486488
_ => bug!("promoteds should have an allocation: {:?}", val),

src/librustc_mir/hair/pattern/_match.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,9 @@ impl PatternFolder<'tcx> for LiteralExpander<'tcx> {
327327
span: pat.span,
328328
kind: box PatKind::Constant {
329329
value: self.tcx.mk_const(Const {
330-
val: ty::ConstKind::Value(self.fold_const_value_deref(*val, rty, crty)),
330+
val: ty::ConstKind::Value(
331+
self.fold_const_value_deref(*val, rty, crty)
332+
),
331333
ty: rty,
332334
}),
333335
},
@@ -1256,7 +1258,9 @@ impl<'tcx> IntRange<'tcx> {
12561258
) -> Option<IntRange<'tcx>> {
12571259
if let Some((target_size, bias)) = Self::integral_size_and_signed_bias(tcx, value.ty) {
12581260
let ty = value.ty;
1259-
let val = if let ty::ConstKind::Value(ConstValue::Scalar(Scalar::Raw { data, size })) = value.val {
1261+
let val = if let ty::ConstKind::Value(ConstValue::Scalar(
1262+
Scalar::Raw { data, size }
1263+
)) = value.val {
12601264
// For this specific pattern we can skip a lot of effort and go
12611265
// straight to the result, after doing a bit of checking. (We
12621266
// could remove this branch and just use the next branch, which

0 commit comments

Comments
 (0)