Skip to content

Should have lint to disallow unused type parameters #25871

Closed
@lambda

Description

@lambda

The following compiles and runs without warning:

fn foo<T: Sync> () { }

fn main() {
    foo::<i32>()
}

I think that this should at least warn, just like unused imports or unused variables; it would almost always be a result from a mistake in refactoring.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions