Closed
Description
I tried this code:
#[repr(i128)]
#[repr(u128)]
struct Foo;
fn main() {
println!("{}", std::mem::size_of::<Foo>());
}
I expected to see this happen: compilation failure
Instead, this happened: Compiles, outputs "0"
Meta
rustc --version --verbose
:
rustc 1.44.0 (49cae5576 2020-06-01)
binary: rustc
commit-hash: 49cae55760da0a43428eba73abcb659bb70cf2e4
commit-date: 2020-06-01
host: x86_64-pc-windows-msvc
release: 1.44.0
LLVM version: 9.0
Also: playground
This issue has been assigned to @nbdd0121 via this comment.