Skip to content

ICE: 'assertion failed: (left == right) (left: 0, right: 1)', ../src/librustc_typeck/check/method/mod.rs:184 #31075

Closed
@oli-obk

Description

@oli-obk

If the Add trait is missing its generic argument, rustc panics

#![feature(no_core, lang_items)]
#![no_core]

#[lang="sized"]
trait Sized {}

#[lang="add"]
trait Add {}

impl Add for i32 {}

fn main() {
    let x = 5 + 6;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions