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 in empty-0.0.4, Rust 1.16, unreachable for-loop pattern #38969

Closed
brson opened this issue Jan 10, 2017 · 7 comments
Closed

ICE in empty-0.0.4, Rust 1.16, unreachable for-loop pattern #38969

brson opened this issue Jan 10, 2017 · 7 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@brson
Copy link
Contributor

brson commented Jan 10, 2017

https://github.com/notriddle/rust-empty 434e1cd22b20b498ecbb00c0b19314617862cb2a

Not on stable/beta.

rustc 1.16.0-nightly (47c8d9fdc 2017-01-08)
binary: rustc
commit-hash: 47c8d9fdcf2e6502cf4ca7d7f059fdc1a2810afa
commit-date: 2017-01-08
host: x86_64-unknown-linux-gnu
release: 1.16.0-nightly
LLVM version: 3.9
brian@ip-10-145-43-250:~/dev/rust-empty⟫ cargo +nightly test
   Compiling void v1.0.2
   Compiling empty v0.0.4 (file:///mnt2/dev/rust-empty)
error: internal compiler error: /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_const_eval/check_match.rs:314: unreachable for-loop pattern
   --> src/lib.rs:191:9
    |
191 |           for i in super::List {
    |  _________^ starting here...
192 | |             void::unreachable(i);
193 | |         }
    | |_________^ ...ending here

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

thread 'rustc' panicked at 'Box<Any>', /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_errors/lib.rs:382
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Build failed, waiting for other jobs to finish...
error: Could not compile `empty`.

To learn more, run the command again with --verbose.

cc @notriddle

@brson brson added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Jan 10, 2017
@brson brson changed the title ICE in empty-0.0.4, unreachable for-loop pattern ICE in empty-0.0.4, Rust 1.16, unreachable for-loop pattern Jan 10, 2017
@brson brson added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jan 11, 2017
@notriddle
Copy link
Contributor

notriddle commented Jan 11, 2017

Reduced test case: https://play.rust-lang.org/?gist=19540e34c9fbb1e99e534bf4b9d5ecac&version=nightly

enum Void {}

fn main() {
    let x: [Void; 0] = [];
    for _ in &x {}
}

@brson
Copy link
Contributor Author

brson commented Jan 11, 2017

Thanks @notriddle !

@notriddle
Copy link
Contributor

#38069 is probably related to this.

@nikomatsakis
Copy link
Contributor

cc @canndrew

@nikomatsakis
Copy link
Contributor

triage: P-high

@rust-highfive rust-highfive added the P-high High priority label Jan 12, 2017
@brson brson added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 26, 2017
@nikomatsakis
Copy link
Contributor

Fixed by #39127 I think?

@brson brson closed this as completed Jan 26, 2017
@brson
Copy link
Contributor Author

brson commented Jan 26, 2017

Thanks @canndrew!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants