Skip to content

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

Closed

Description

@dwrensha

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

Activity

  1. added
    C-bugCategory: This is a bug.
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Apr 13, 2021
  2. dwrensha commented on Apr 13, 2021

    @dwrensha
    ContributorAuthor

    This is a regression, introduced in #67820.

    (Thanks cargo-bisect-rustc!)

    cc @ecstatic-morse

  3. added
    A-parserArea: The lexing & parsing of Rust source code to an AST
    regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.
    on Apr 13, 2021
  4. added
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Apr 13, 2021
  5. dwrensha commented on Apr 13, 2021

    @dwrensha
    ContributorAuthor

    The ICE still happens if you close the parens:

    fn f(t:for<>t?) 
  6. apiraino commented on Apr 14, 2021

    @apiraino
    Contributor

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

    @rustbot label -I-prioritize +P-low

  7. added
    P-lowLow priority
    and removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Apr 14, 2021
  8. added 2 commits that reference this issue on Apr 16, 2021
  9. added a commit that references this issue on Jun 6, 2021
    1bef90f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parserArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-lowLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions