Skip to content

Commit 8bbe4a0

Browse files
committed
Sync from rust 942db67
2 parents 4633398 + a005ccd commit 8bbe4a0

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

Diff for: patches/0029-stdlib-Disable-f16-and-f128-in-compiler-builtins.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ index 7165c3e48af..968552ad435 100644
1616

1717
[dependencies]
1818
core = { path = "../core" }
19-
-compiler_builtins = { version = "=0.1.143", features = ['rustc-dep-of-std'] }
20-
+compiler_builtins = { version = "=0.1.143", features = ['rustc-dep-of-std', 'no-f16-f128'] }
19+
-compiler_builtins = { version = "=0.1.145", features = ['rustc-dep-of-std'] }
20+
+compiler_builtins = { version = "=0.1.145", features = ['rustc-dep-of-std', 'no-f16-f128'] }
2121

2222
[dev-dependencies]
2323
rand = { version = "0.8.5", default-features = false, features = ["alloc"] }

Diff for: src/base.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,16 @@ fn codegen_stmt<'tcx>(
868868
NullOp::UbChecks => {
869869
let val = fx.tcx.sess.ub_checks();
870870
let val = CValue::by_val(
871-
fx.bcx.ins().iconst(types::I8, i64::try_from(val).unwrap()),
871+
fx.bcx.ins().iconst(types::I8, i64::from(val)),
872+
fx.layout_of(fx.tcx.types.bool),
873+
);
874+
lval.write_cvalue(fx, val);
875+
return;
876+
}
877+
NullOp::ContractChecks => {
878+
let val = fx.tcx.sess.contract_checks();
879+
let val = CValue::by_val(
880+
fx.bcx.ins().iconst(types::I8, i64::from(val)),
872881
fx.layout_of(fx.tcx.types.bool),
873882
);
874883
lval.write_cvalue(fx, val);

0 commit comments

Comments
 (0)