Skip to content

Internal Compiler Error: 'assertion failed: (left != right) at compiler/rustc_parse/src/parser/ty.rs:324:9 #84148

New issue

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

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

Already on GitHub? # to your account

Closed
dwrensha opened this issue Apr 13, 2021 · 3 comments · Fixed by #86010
Labels
A-parser Area: The lexing & parsing of Rust source code to an AST C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-low Low priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@dwrensha
Copy link
Contributor

rustc panics on the following input, found by fuzz-rustc:

fn f(t:for<>t?
$ rustc bug.rs
error: this file contains an unclosed delimiter
 --> bug.rs:1:16
  |
1 | fn f(t:for<>t?
  |     -          ^
  |     |
  |     unclosed delimiter

thread 'rustc' panicked at 'assertion failed: `(left != right)`
  left: `Token { kind: Question, span: bug.rs:1:14: 1:15 (#0) }`,
 right: `Question`', compiler/rustc_parse/src/parser/ty.rs:324:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

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

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.53.0-nightly (a86612456 2021-04-11) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
error: aborting due to previous error
@dwrensha dwrensha added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 13, 2021
@dwrensha
Copy link
Contributor Author

This is a regression, introduced in #67820.

(Thanks cargo-bisect-rustc!)

cc @ecstatic-morse

@jyn514 jyn514 added A-parser Area: The lexing & parsing of Rust source code to an AST regression-from-stable-to-stable Performance or correctness regression from one stable version to another. labels Apr 13, 2021
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Apr 13, 2021
@dwrensha
Copy link
Contributor Author

The ICE still happens if you close the parens:

fn f(t:for<>t?) 

@apiraino
Copy link
Contributor

Assigning priority as discussed as part of the Prioritization Working Group procedure and removing I-prioritize.

@rustbot label -I-prioritize +P-low

@rustbot rustbot added P-low Low priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Apr 14, 2021
fanninpm added a commit to fanninpm/glacier that referenced this issue Apr 16, 2021
Low priority

Issue: rust-lang/rust#84148
fanninpm added a commit to fanninpm/glacier that referenced this issue Apr 16, 2021
Low priority

Issue: rust-lang/rust#84148
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Apr 19, 2021
@bors bors closed this as completed in 1bef90f Jun 7, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-parser Area: The lexing & parsing of Rust source code to an AST C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-low Low priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants