mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
18 lines
384 B
Rust
18 lines
384 B
Rust
// ICE !base.layout().is_sized()
|
|
// issue: rust-lang/rust#123078
|
|
|
|
struct S {
|
|
a: [u8],
|
|
//~^ ERROR the size for values of type `[u8]` cannot be known at compilation time
|
|
b: (),
|
|
}
|
|
|
|
const C: S = unsafe { std::mem::transmute(()) };
|
|
//~^ ERROR cannot transmute between types of different sizes, or dependently-sized types
|
|
const _: [(); {
|
|
C;
|
|
0
|
|
}] = [];
|
|
|
|
pub fn main() {}
|