Skip to content

Deprecated re-exports are ignored #47236

@sgrif

Description

@sgrif

The following code compiles with no warnings, even though it should emit a deprecation warning. Both Diesel and Futures have mistakenly used this to deprecate items moved to a new location, without realizing that users would never see a deprecation warning.

pub mod foo {
    #[deprecated(since = "0.1.0")]
    pub use std::option::Option;
}

mod bar {
    use foo::Option;
}

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.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions