Skip to content

Cannot create binary operator with two operands of differing type! #2150

Closed

Description

@jruderman
fn fail_len(v: [const int]) -> uint {
    let mut i = fail;
    for v.each {|x| i += 1u; }
    ret i;
}
fn main() {}

Breaks rustc:

Assertion failed: (S1->getType() == S2->getType() && "Cannot create binary operator with two operands of differing type!"), function Create, file /Users/jruderman/code/rust/src/llvm/lib/VMCore/Instructions.cpp, line 1825.

Activity

  1. added a commit that references this issue on Sep 22, 2022
  2. added a commit that references this issue on Jul 8, 2026
  3. added a commit that references this issue on Aug 21, 2026
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

    A-codegenArea: Code generation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions