Skip to content

block_in_if_condition_stmt: false positive with blocks inside iterator method calls #1141

Closed
@birkenfeld

Description

@birkenfeld

Example:

fn main() {
    let mut range = 0..10;
    debug_assert!(range.all(|i| { i < 10 }));
}

Maybe just an in_macro check missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't have

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions