Skip to content

Regression in by-val self u8s #7285

Closed
Closed
@brson

Description

@brson
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions