Skip to content

lint of unnecessary parentheses around if condition may case error #63156

Closed
@bravomikekilo

Description

@bravomikekilo

when unnecessary parentheses is removed, may lack a whitespace between if and expr.

example
if(is_prime) {println!("hello")};
while be replaced to
ifis_prime {println!("hello")};

Maybe we should replare (expr) with a pair of whitespace around expr, instead of just expr;

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions