Closed
Description
pub unsafe fn main() {
return;
if *ptr::null() {}
}
temp.rs:3:12: 3:30 warning: unreachable expression
temp.rs:3 return; if ptr::null() {}
^~~~~~~~~~~~~~~~~~
rustc: /home/ben/apps/rust/src/llvm/include/llvm/Support/Casting.h:231: typename llvm::enable_if<llvm::is_same<Y, typename llvm::simplify_type::SimpleType>, typename llvm::cast_retty<X, Y>::ret_type>::type llvm::cast(Y_) [with X = llvm::SequentialType, Y = llvm::Type, typename llvm::enable_if<llvm::is_same<Y, typename llvm::simplify_type::SimpleType>, typename llvm::cast_retty<X, Y_>::ret_type>::type = llvm::SequentialType*]: Assertion `isa(Val) && "cast() argument of incompatible type!"' failed.
Happens at least with the (a bit out of date) master 2d28d64.