about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm_util.rs
diff options
context:
space:
mode:
authorJack Wrenn <jack@wrenn.fyi>2024-08-12 22:52:59 +0000
committerJack Wrenn <jack@wrenn.fyi>2024-08-23 14:37:36 +0000
commit2540070fd45defe48d02aa7af974c8f295b326a4 (patch)
tree4803e07359dcc31cbe80749e3435a14536592432 /compiler/rustc_codegen_llvm/src/llvm_util.rs
parent4d5b3b196284aded6ae99d12bcf149ffdc8ef379 (diff)
downloadrust-2540070fd45defe48d02aa7af974c8f295b326a4.tar.gz
rust-2540070fd45defe48d02aa7af974c8f295b326a4.zip
document & impl the transmutation modeled by `BikeshedIntrinsicFrom`
Documents that `BikeshedIntrinsicFrom` models transmute-via-union,
which is slightly more expressive than the transmute-via-cast
implemented by `transmute_copy`. Additionally, we provide an
implementation of transmute-via-union as a method on the
`BikeshedIntrinsicFrom` trait with additional documentation on
the boundary between trait invariants and caller obligations.

Whether or not transmute-via-union is the right kind of transmute
to model remains up for discussion [1]. Regardless, it seems wise
to document the present behavior.

[1] https://rust-lang.zulipchat.com/#narrow/stream/216762-project-safe-transmute/topic/What.20'kind'.20of.20transmute.20to.20model.3F/near/426331967
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
0 files changed, 0 insertions, 0 deletions