We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed12fe8 commit e62f17cCopy full SHA for e62f17c
1 file changed
compiler/rustc_mir_build/src/thir/cx/expr.rs
@@ -807,7 +807,7 @@ impl<'tcx> ThirBuildCx<'tcx> {
807
user_ty: None,
808
};
809
let mk_usize_kind = |val: u64| ExprKind::NonHirLiteral {
810
- lit: ScalarInt::try_from_uint(val, tcx.data_layout.pointer_size()).unwrap(),
+ lit: ScalarInt::try_from_target_usize(val, tcx).unwrap(),
811
812
813
let mk_call =
0 commit comments