Skip to content

Commit

Permalink
pacify tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
arielb1 committed Feb 8, 2017
1 parent 3652c09 commit d71988a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/librustc_trans/mir/block.rs
Expand Up @@ -147,8 +147,9 @@ impl<'a, 'tcx> MirContext<'a, 'tcx> {
mir::TerminatorKind::Switch { ref discr, ref adt_def, ref targets } => {
let discr_lvalue = self.trans_lvalue(&bcx, discr);
let ty = discr_lvalue.ty.to_ty(bcx.tcx());
let discr = adt::trans_get_discr(&bcx, ty, discr_lvalue.llval, discr_lvalue.alignment,
None, true);
let discr = adt::trans_get_discr(
&bcx, ty, discr_lvalue.llval, discr_lvalue.alignment,
None, true);

let mut bb_hist = FxHashMap();
for target in targets {
Expand Down Expand Up @@ -216,7 +217,8 @@ impl<'a, 'tcx> MirContext<'a, 'tcx> {
llscratch
}
Ref(llval, align) => {
assert_eq!(align, Alignment::AbiAligned, "return pointer is unaligned!");
assert_eq!(align, Alignment::AbiAligned,
"return pointer is unaligned!");
llval
}
};
Expand Down
3 changes: 2 additions & 1 deletion src/librustc_trans/mir/rvalue.rs
Expand Up @@ -113,7 +113,8 @@ impl<'a, 'tcx> MirContext<'a, 'tcx> {
let op = self.trans_operand(&bcx, operand);
// Do not generate stores and GEPis for zero-sized fields.
if !common::type_is_zero_size(bcx.ccx, op.ty) {
let mut val = LvalueRef::new_sized(dest.llval, dest.ty, dest.alignment);
let mut val = LvalueRef::new_sized(
dest.llval, dest.ty, dest.alignment);
let field_index = active_field_index.unwrap_or(i);
val.ty = LvalueTy::Downcast {
adt_def: adt_def,
Expand Down

0 comments on commit d71988a

Please sign in to comment.