Open
Description
I am running out of memory when trying to compile the following code:
#![feature(transmutability)]
use std::mem::{Assume, TransmuteFrom};
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: TransmuteFrom<Src, { Assume::SAFETY }>
{}
pub union U {
pub a: &'static u8,
pub b: &'static u16,
pub c: &'static u32,
pub d: &'static u64,
}
fn main() {
is_maybe_transmutable::<[U; 10], [U; 10]>();
}
Meta
rustc --version --verbose
:
rustc 1.88.0-nightly (4824c2bb7 2025-05-02)
binary: rustc
commit-hash: 4824c2bb7445cb2478aab0190c268c939d77a0f6
commit-date: 2025-05-02
host: x86_64-unknown-linux-gnu
release: 1.88.0-nightly
LLVM version: 20.1.2