about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-08-27 00:41:59 +0200
committerGitHub <noreply@github.com>2024-08-27 00:41:59 +0200
commit29923b68019a4547d41b36299b2cefe19303e902 (patch)
treec5059597c68424cbf8c30a74e46126c14e089bdd /compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs
parentc6ceb5be24d8f7a2da9f769fef6d6d2fb9ed571e (diff)
parent2540070fd45defe48d02aa7af974c8f295b326a4 (diff)
downloadrust-29923b68019a4547d41b36299b2cefe19303e902.tar.gz
rust-29923b68019a4547d41b36299b2cefe19303e902.zip
Rollup merge of #129032 - jswrenn:transmute-method, r=compiler-errors
Document & implement 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

Tracking Issue: https://github.com/rust-lang/rust/issues/99571

r? `@compiler-errors`

cc `@scottmcm,` `@Lokathor`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs')
0 files changed, 0 insertions, 0 deletions