-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-transmutability`#![feature(transmutability)]``#![feature(transmutability)]`I-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Description
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
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-transmutability`#![feature(transmutability)]``#![feature(transmutability)]`I-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.