Skip to main content

Crate rustc_transmute

Crate rustc_transmute 

Source
Expand description

Checks whether one type’s representation can be reinterpreted as another.

The analysis converts compiler layouts into trees of bytes, references, and definition markers. It prunes destination paths that may carry safety invariants unless safety is assumed, then converts the trees into deterministic finite automata. Comparing the automata produces an rustc_middle::ty::transmute::Answer; reference transitions can leave rustc_middle::ty::transmute::Conditions for the trait solver to discharge.

Modules§

layout
maybe_transmutable 🔒
rustc 🔒

Structs§

Assume
Proof obligations supplied by the caller rather than checked by the analysis.
TransmuteTypeEnv