Skip to content

unreachable_pub lint false positive #101169

Open
@laralove143

Description

@laralove143

I tried this code:

#![warn(unreachable_pub)]

mod foo {
    pub struct Foo;
}

use foo::Foo;

Here's a link for the same code on playground

I expected to see this happen: No warning, as the item is actually accessible from the root crate

Instead, this happened: It says the item is unreachable, even though it isn't

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.L-unreachable_pubLint: unreachable_pub

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions