about summary refs log tree commit diff
path: root/compiler/rustc_transmute/src/layout/tree
AgeCommit message (Collapse)AuthorLines
2025-06-09transmutability: shift abstraction boundaryJack Wrenn-8/+8
Previously, `rustc_transmute`'s layout representations were genericized over `R`, a reference. Now, it's instead genericized over representations of type and region. This allows us to move reference transmutability logic from `rustc_trait_selection` to `rustc_transmutability` (and thus unit test it independently of the compiler), and — in a follow-up PR — will make it possible to support analyzing function pointer transmutability with minimal surgery.
2025-04-25transmutability: Support char, NonZeroXxxJoshua Liebow-Feeser-16/+8
Note that `NonZero` support is not wired up, as the author encountered bugs while attempting this. A future commit will wire up `NonZero` support.
2024-09-03Add `warn(unreachable_pub)` to `rustc_transmute`.Nicholas Nethercote-1/+1
2024-02-27safe transmute: revise safety analysisJack Wrenn-22/+47
Migrate to a simplified safety analysis that does not use visibility. Closes https://github.com/rust-lang/project-safe-transmute/issues/15
2022-07-27Initial (incomplete) implementation of transmutability trait.Jack Wrenn-0/+80
This initial implementation handles transmutations between types with specified layouts, except when references are involved. Co-authored-by: Igor null <m1el.2027@gmail.com>