Skip to content

Missing right parenthesis panics the compiler #58856

Closed
@nakacristo

Description

@nakacristo

I wrote some shitty code here: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=d44eb1015f294e937d86b157339d0978
And it broke the compiler. Apparently by reaching supposedly unreachable code of a parsing function.

Some background can be found at https://users.rust-lang.org/t/the-squeeze-challenge/25762/10
As pointed by @cuviper the problem can be reduced to

trait Howness {}
impl Howness for (){
    fn how_are_you(&self->Empty
    {
        Empty
    }
}

Metadata

Metadata

Assignees

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-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.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