diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2024-04-02 20:37:39 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-02 20:37:39 -0400 |
| commit | e9ef8e1efa387fa235d63c191492f63f70959348 (patch) | |
| tree | 4935ba4905ceb6d899d6974c036f1f8277103cf2 /compiler/rustc_codegen_ssa/src/mir | |
| parent | 0697ee9af5a0493631606e5fbe80cc802a95eb23 (diff) | |
| parent | f2cff5ebb9ebc9712eec88dd5ec578f76efb33bc (diff) | |
| download | rust-e9ef8e1efa387fa235d63c191492f63f70959348.tar.gz rust-e9ef8e1efa387fa235d63c191492f63f70959348.zip | |
Rollup merge of #122935 - RalfJung:with-exposed-provenance, r=Amanieu
rename ptr::from_exposed_addr -> ptr::with_exposed_provenance As discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/136281-t-opsem/topic/To.20expose.20or.20not.20to.20expose/near/427757066). The old name, `from_exposed_addr`, makes little sense as it's not the address that is exposed, it's the provenance. (`ptr.expose_addr()` stays unchanged as we haven't found a better option yet. The intended interpretation is "expose the provenance and return the address".) The new name nicely matches `ptr::without_provenance`.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/mir')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/rvalue.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs index 0e4018e44b7..6f7b98a262d 100644 --- a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs +++ b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs @@ -509,7 +509,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { // Since int2ptr can have arbitrary integer types as input (so we have to do // sign extension and all that), it is currently best handled in the same code // path as the other integer-to-X casts. - | mir::CastKind::PointerFromExposedAddress => { + | mir::CastKind::PointerWithExposedProvenance => { assert!(bx.cx().is_backend_immediate(cast)); let ll_t_out = bx.cx().immediate_backend_type(cast); if operand.layout.abi.is_uninhabited() { |
