Skip to content
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

ICE when Add trait is missing the add method #31076

Closed
oli-obk opened this issue Jan 21, 2016 · 2 comments · Fixed by #55710
Closed

ICE when Add trait is missing the add method #31076

oli-obk opened this issue Jan 21, 2016 · 2 comments · Fixed by #55710
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Jan 21, 2016

if the method is missing, rustc panics due to an unwrap on a None:

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

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

#[lang="add"]
trait Add<T> {}

impl Add<i32> for i32 {}

fn main() {
    let x = 5 + 6;
}
@oli-obk oli-obk changed the title ICE when Add trai is missing the add method ICE when Add trait is missing the add method Jan 21, 2016
@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
@istankovic
Copy link
Contributor

Still an issue with rustc 1.26.0-nightly (adf2135ad 2018-03-17).

jsirs added a commit to jsirs/rust that referenced this issue Nov 5, 2018
Add test for incompleately implemented add trait, see issue rust-lang#31076
@jsirs jsirs mentioned this issue Nov 5, 2018
kennytm added a commit to kennytm/rust that referenced this issue Nov 6, 2018
bors added a commit that referenced this issue Nov 6, 2018
Rollup of 11 pull requests

Successful merges:

 - #55490 (resolve: Fix ICE in macro import error recovery)
 - #55597 (std: Enable usage of `thread_local!` through imports)
 - #55601 (Fix tracking issue numbers for some unstable features)
 - #55621 (Add precision for create_dir function)
 - #55644 (ci: Add Dockerfile for dist-powerpcspe-linux)
 - #55664 (Make "all possible cases" help message uniform with existing help messages)
 - #55689 (miri: binary_op_val -> binary_op_imm)
 - #55694 (Fixes #31076)
 - #55696 (NLL Diagnostic Review 3: Missing errors for borrows of union fields)
 - #55700 (Update ui tests with respect to NLL)
 - #55703 (Update `configure --help` (via configure.py) to reflect decoupling of debug+optimize)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants