Skip to content

#[deprecated] on use statements is silently ignored #130029

Closed as not planned
Closed as not planned
@cyrgani

Description

@cyrgani

The following code gives no deprecation warning on use other_crate::Thing; but also no useless_deprecated error:

mod other_crate {
    pub mod module {
        pub struct Thing;
    }

    #[deprecated(note = "use the explicit path")]
    pub use module::*;
}

use other_crate::Thing;

I think it would make sense to allow deprecation of use statements, but if there's a reason not to allow this, then useless_deprecated should be emitted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.L-deprecatedLint: deprecated

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions