rust/compiler/rustc_ty_utils/src
Jack Wrenn 2540070fd4 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
2024-08-23 14:37:36 +00:00
..
abi.rs Auto merge of #125854 - beetrees:zst-arg-abi, r=estebank 2024-08-18 22:15:41 +00:00
assoc.rs address review comments 2024-06-28 15:44:20 +00:00
common_traits.rs Start implementing needs_async_drop and related 2024-05-29 12:50:44 +03:00
consts.rs rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
errors.rs Stop using String for error codes. 2024-01-29 07:41:41 +11:00
implied_bounds.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
instance.rs document & impl the transmutation modeled by BikeshedIntrinsicFrom 2024-08-23 14:37:36 +00:00
layout_sanity_check.rs Use assert_matches around the compiler 2024-08-11 12:25:39 -04:00
layout.rs Auto merge of #128812 - nnethercote:shrink-TyKind-FnPtr, r=compiler-errors 2024-08-14 00:56:53 +00:00
lib.rs Use tidy to sort crate attributes for all compiler crates. 2024-06-12 15:49:10 +10:00
needs_drop.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
opaque_types.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
representability.rs Remove extern crate rustc_middle from rustc_ty_utils. 2024-05-13 08:20:18 +10:00
sig_types.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
structural_match.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
ty.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00