diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-02-07 19:32:21 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-02-07 19:32:21 +0000 |
| commit | 8bbe4a022d7505b5313a463a5b359832a3ed5258 (patch) | |
| tree | cc7e2fa4fd98f91bbd346745b5afef59c6a3e299 | |
| parent | 46333985ceae3adc407cba7320fb109d8746ba24 (diff) | |
| parent | a005ccdc4e431d6b351de291318a1855907eb72f (diff) | |
| download | rust-8bbe4a022d7505b5313a463a5b359832a3ed5258.tar.gz rust-8bbe4a022d7505b5313a463a5b359832a3ed5258.zip | |
Sync from rust 942db6782f4a28c55b0b75b38fd4394d0483390f
| -rw-r--r-- | patches/0029-stdlib-Disable-f16-and-f128-in-compiler-builtins.patch | 4 | ||||
| -rw-r--r-- | src/base.rs | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/patches/0029-stdlib-Disable-f16-and-f128-in-compiler-builtins.patch b/patches/0029-stdlib-Disable-f16-and-f128-in-compiler-builtins.patch index bf58e485158..bac411d1eb0 100644 --- a/patches/0029-stdlib-Disable-f16-and-f128-in-compiler-builtins.patch +++ b/patches/0029-stdlib-Disable-f16-and-f128-in-compiler-builtins.patch @@ -16,8 +16,8 @@ index 7165c3e48af..968552ad435 100644 [dependencies] core = { path = "../core" } --compiler_builtins = { version = "=0.1.143", features = ['rustc-dep-of-std'] } -+compiler_builtins = { version = "=0.1.143", features = ['rustc-dep-of-std', 'no-f16-f128'] } +-compiler_builtins = { version = "=0.1.145", features = ['rustc-dep-of-std'] } ++compiler_builtins = { version = "=0.1.145", features = ['rustc-dep-of-std', 'no-f16-f128'] } [dev-dependencies] rand = { version = "0.8.5", default-features = false, features = ["alloc"] } diff --git a/src/base.rs b/src/base.rs index 7a40d236b92..a2b9e5712e5 100644 --- a/src/base.rs +++ b/src/base.rs @@ -868,7 +868,16 @@ fn codegen_stmt<'tcx>( NullOp::UbChecks => { let val = fx.tcx.sess.ub_checks(); let val = CValue::by_val( - fx.bcx.ins().iconst(types::I8, i64::try_from(val).unwrap()), + fx.bcx.ins().iconst(types::I8, i64::from(val)), + fx.layout_of(fx.tcx.types.bool), + ); + lval.write_cvalue(fx, val); + return; + } + NullOp::ContractChecks => { + let val = fx.tcx.sess.contract_checks(); + let val = CValue::by_val( + fx.bcx.ins().iconst(types::I8, i64::from(val)), fx.layout_of(fx.tcx.types.bool), ); lval.write_cvalue(fx, val); |
