Skip to content

Commit 5cd848c

Browse files
committed
Fix type mismatches
1 parent bb339d4 commit 5cd848c

File tree

1 file changed

+3
-3
lines changed
  • compiler/rustc_codegen_ssa/src

1 file changed

+3
-3
lines changed

compiler/rustc_codegen_ssa/src/glue.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use crate::common::IntPredicate;
66
use crate::meth;
77
use crate::traits::*;
8-
use rustc_middle::ty::{self, Ty};
8+
use rustc_middle::ty::{self, Ty, UintTy};
99
use rustc_target::abi::WrappingRange;
1010

1111
pub fn size_and_align_of_dst<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
@@ -41,11 +41,11 @@ pub fn size_and_align_of_dst<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
4141
let (size, overflow) = bx.checked_binop(
4242
OverflowOp::Mul,
4343
bx.tcx().mk_mach_uint(UintTy::Usize),
44-
unit.size.bytes(),
44+
bx.const_usize(unit.size.bytes()),
4545
info.unwrap(),
4646
);
4747
(
48-
bx.select(overflow, bx.const_usize(usize::MAX), size),
48+
bx.select(overflow, bx.const_usize(u64::MAX), size),
4949
bx.const_usize(unit.align.abi.bytes()),
5050
)
5151
}

0 commit comments

Comments
 (0)