Closed
Description
trait to_float {
fn to_float(self) -> float;
}
impl to_float for u8 {
fn to_float(self) -> float { 0.0 }
}
pub fn main() {
println("hello, world");
}
rustc: /opt/dev/rust2/src/llvm/lib/IR/Instructions.cpp:2290: static llvm::CastInst* llvm::CastInst::Create(llvm::Instruction::CastOps, llvm::Value*, llvm::Type*, const llvm::Twine&, llvm::Instruction*): Assertion `castIsValid(op, S, Ty) && "Invalid cast!"' failed.