Add intrinsics::transmute_unchecked#110706
Conversation
|
r? @cuviper (rustbot has picked a reviewer for you, use r? to override) |
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
This comment has been minimized.
This comment has been minimized.
This takes a whole 3 lines in `compiler/` since it lowers to `CastKind::Transmute` in MIR *exactly* the same as the existing `intrinsics::transmute` does, it just doesn't have the fancy checking in `hir_typeck`. Added to enable experimenting with the request in <rust-lang#106281 (comment)> and because the portable-simd folks might be interested for dependently-sized array-vector conversions. It also simplifies a couple places in `core`.
6d5eba8 to
1de2257
Compare
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#110255 (Suggest using integration tests for test crate using own proc-macro) - rust-lang#110514 (Remove `find_map_relevant_impl`) - rust-lang#110566 (Don't create projection ty for const projection) - rust-lang#110637 (Group some sections of our logs in github actions) - rust-lang#110706 (Add `intrinsics::transmute_unchecked`) - rust-lang#110714 (Normalize types and consts in MIR opts.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
|
@rust-timer build e99ae471c8dc6ac25c35ffdf3d436fc376c9f74d |
This takes a whole 3 lines in
compiler/since it lowers toCastKind::Transmutein MIR exactly the same as the existingintrinsics::transmutedoes, it just doesn't have the fancy checking inhir_typeck.Added to enable experimenting with the request in #106281 (comment) and because the portable-simd folks might be interested for dependently-sized array-vector conversions.
It also simplifies a couple places in
core.See also #108442 (comment), where
CastKind::Transmutewas added having exactly these semantics before the lang meeting (which I wasn't in) independently expressed interest.