diff options
| author | Ralf Jung <post@ralfj.de> | 2024-09-14 13:30:37 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-10-21 15:05:35 +0100 |
| commit | c3e928d8ddc73f5681778208f6c44cf958694e8b (patch) | |
| tree | 94c237b0210e5e7d0f0409c6e5785f237dc5d288 /compiler/rustc_codegen_ssa/src | |
| parent | bfab34af4c5bfbcc9168064857bbec826a60a0b9 (diff) | |
| download | rust-c3e928d8ddc73f5681778208f6c44cf958694e8b.tar.gz rust-c3e928d8ddc73f5681778208f6c44cf958694e8b.zip | |
stabilize Strict Provenance and Exposed Provenance
This comes with a big docs rewrite.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/rvalue.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs index a132ca69540..82fea4c58e1 100644 --- a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs +++ b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs @@ -361,12 +361,16 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { (Int(..) | Float(_), Int(..) | Float(_)) => bx.bitcast(imm, to_backend_ty), (Pointer(..), Pointer(..)) => bx.pointercast(imm, to_backend_ty), (Int(..), Pointer(..)) => bx.ptradd(bx.const_null(bx.type_ptr()), imm), - (Pointer(..), Int(..)) => bx.ptrtoint(imm, to_backend_ty), + (Pointer(..), Int(..)) => { + // FIXME: this exposes the provenance, which shouldn't be necessary. + bx.ptrtoint(imm, to_backend_ty) + } (Float(_), Pointer(..)) => { let int_imm = bx.bitcast(imm, bx.cx().type_isize()); bx.ptradd(bx.const_null(bx.type_ptr()), int_imm) } (Pointer(..), Float(_)) => { + // FIXME: this exposes the provenance, which shouldn't be necessary. let int_imm = bx.ptrtoint(imm, bx.cx().type_isize()); bx.bitcast(int_imm, to_backend_ty) } |
