Closed
Description
static X: uint = unsafe { *(0 as *const uint) };
rustc: /build/rust-git/src/rust/src/llvm/include/llvm/Support/Casting.h:237: typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [with X = llvm::GlobalVariable; Y = llvm::Value; typename llvm::cast_retty<X, Y*>::ret_type = llvm::GlobalVariable*]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
struct X {
i: int,
j: u8,
}
static SIZE_OF_X: uint = unsafe { &(*(0 as *const [X, ..2]))[1] as *const X as uint };
same as above