Skip to content

Unary negation not properly typechecked #813

@msullivan

Description

@msullivan
Contributor
fn main() {
    -"foo";
}

produces

rustc: Constants.cpp:1747: static llvm::Constant* llvm::ConstantExpr::getNeg(llvm::Constant*, bool, bool): Assertion `C->getType()->isIntOrIntVectorTy() && "Cannot NEG a nonintegral value!"' failed.

Activity

added a commit that references this issue on Dec 12, 2017
added a commit that references this issue on Oct 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @marijnh@msullivan

        Issue actions

          Unary negation not properly typechecked · Issue #813 · rust-lang/rust