rust/library
Matthias Krüger 29923b6801
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`
2024-08-27 00:41:59 +02:00
..
alloc Rollup merge of #129544 - mu001999-contrib:dead-code/clean, r=compiler-errors 2024-08-26 01:49:03 +02:00
backtrace@72265bea21 Update backtrace to 0.3.73 2024-06-06 22:50:45 -07:00
core Rollup merge of #129032 - jswrenn:transmute-method, r=compiler-errors 2024-08-27 00:41:59 +02:00
panic_abort step cfg(bootstrap) 2024-07-28 14:46:29 -04:00
panic_unwind Auto merge of #128083 - Mark-Simulacrum:bump-bootstrap, r=albertlarsan68 2024-07-30 17:49:08 +00:00
portable-simd Fix doc nits 2024-07-26 13:26:33 +01:00
proc_macro Rollup merge of #128307 - ojeda:unescaped_backticks, r=GuillaumeGomez 2024-07-29 11:42:35 +02:00
profiler_builtins Build library/profiler_builtins from ci-llvm if appropriate 2024-08-24 21:21:34 +10:00
rtstartup Let InstCombine remove Clone shims inside Clone shims 2024-07-25 15:14:42 -04:00
rustc-std-workspace-alloc
rustc-std-workspace-core
rustc-std-workspace-std
std Rollup merge of #129588 - hermit-os:sleep-micros, r=workingjubilee 2024-08-26 17:25:32 +02:00
stdarch@d9466edb4c Update stdarch submodule 2024-08-21 00:20:27 -07:00
sysroot Auto merge of #125016 - nicholasbishop:bishop-cb-112, r=tgross35 2024-07-29 07:41:33 +00:00
test Reduce merged doctest source code size 2024-08-13 20:14:56 +02:00
unwind Auto merge of #128083 - Mark-Simulacrum:bump-bootstrap, r=albertlarsan68 2024-07-30 17:49:08 +00:00
windows_targets Add windows-targets crate to std's sysroot 2024-08-09 10:43:43 +00:00
Cargo.lock Update compiler_builtins to 0.1.121 2024-08-23 12:02:26 -07:00
Cargo.toml Exclude windows-targets from the workspace 2024-08-09 11:06:39 +00:00