Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
oli-obk opened this issue Jan 21, 2016 · 3 comments
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Jan 21, 2016

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;
}
@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 21, 2016

related to #9307

@steveklabnik steveklabnik added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jan 26, 2016
@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 22, 2017
@steveklabnik
Copy link
Member

Triage: still ICEs

@estebank
Copy link
Contributor

No longer ICEs:

error[E0369]: binary operation `+` cannot be applied to type `{integer}`
  --> src/main.rs:13:13
   |
13 |     let x = 5 + 6;
   |             ^^^^^
   |
   = note: an implementation of `std::ops::Add` might be missing for `{integer}`

@estebank estebank added A-diagnostics Area: Messages for errors, warnings, and lints and removed C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Jan 30, 2019
@estebank estebank added A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. and removed A-diagnostics Area: Messages for errors, warnings, and lints labels Apr 27, 2019
@XAMPPRocky XAMPPRocky added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Aug 23, 2019
@oli-obk oli-obk closed this as completed Sep 25, 2020
@fmease fmease added A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. and removed A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. labels Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

6 participants