Compilation unterminated when type variable is a huge array #118860
Open
Description
opened on Dec 12, 2023
I tried this code:
// check-pass
#![feature(transmutability)]
mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
pub struct Context;
pub fn is_maybe_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, Context, {
Assume {
alignment: false,
lifetimes: false,
safety: true,
validity: false,
}
}>
{}
}
fn main() {
let a : &'static [u8; 32768];
assert::is_maybe_transmutable::<&'static [u16; 32768], &'static [u8; 32768]>();
}
I expected to see this happen: compilation terminated
Instead, this happened: compilation unterminated
Meta
rustc --version --verbose
:
rustc 1.74.0-nightly (0288f2e19 2023-09-25)
binary: rustc
commit-hash: 0288f2e1955b154262e0669ec5f7bb9a4c6cf5aa
commit-date: 2023-09-25
host: x86_64-unknown-linux-gnu
release: 1.74.0-nightly
LLVM version: 17.0.0
Backtrace
nop
Activity