Skip to content

internal compiler error: unexpected lifetime bound #68890

Closed
@dwrensha

Description

@dwrensha

I'm seeing an internal compiler error on the following input (found by fuzz-rustc):

$ echo "enum e{A((?'a a+?+l))}" > main.rs
$ rustc main.rs
error: `?` may only modify trait bounds, not lifetime bounds
 --> main.rs:1:11
  |
1 | enum e{A((?'a a+?+l))}
  |           ^

error: expected one of `)`, `+`, or `,`, found `a`
 --> main.rs:1:15
  |
1 | enum e{A((?'a a+?+l))}
  |               ^ expected one of `)`, `+`, or `,`

error: internal compiler error: unexpected lifetime bound
 --> main.rs:1:11
  |
1 | enum e{A((?'a a+?+l))}
  |           ^^^

thread 'rustc' panicked at 'Box<Any>', <::std::macros::panic macros>:2:4
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

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

note: rustc 1.43.0-nightly (58b834344 2020-02-05) running on x86_64-unknown-linux-gnu

error: aborting due to 3 previous errors

The error happens on nightly and beta but not on stable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-mediumMedium 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-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions