Skip to content

New Lint: parameter of function only used in recursive call #2624

Closed
@flip1995

Description

@flip1995

If a parameter of a function is only used in a recursive call of this functions body, it is probably unintended and useless:

fn rec_fn(a: i32) {
    //some conditions, no a... 
    rec_fn(a) 
} 

See also #2622 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lintsL-unnecessaryLint: Warn about unnecessary code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions