Skip to content

Incorrect "unnecessary parentheses" warning for match (return) #55164

Description

@varkor
#![allow(unreachable_code)]

fn main() {
	match (return) {} // warning: unnecessary parentheses around `match` head expression
}

Removing the parentheses results in a syntax error.

Activity

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-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions