Skip to content

dead_code shouldn't warn for unused exported methods when compiling tests #10914

Closed
@sfackler

Description

@sfackler

If I have

pub fn foo() {}

pub fn bar() {}

#[test]
fn test_bar() { bar() }

and compile the tests, I get an unused code warning for foo but I probably shouldn't in this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions