Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
cyrgani opened this issue Sep 6, 2024 · 2 comments
Closed

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

cyrgani opened this issue Sep 6, 2024 · 2 comments
Labels
C-bug Category: This is a bug. L-deprecated Lint: deprecated

Comments

@cyrgani
Copy link
Contributor

cyrgani commented Sep 6, 2024

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.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 6, 2024
@kadiwa4
Copy link
Contributor

kadiwa4 commented Sep 6, 2024

This is tracked in #30827 and #84584 already.

@cyrgani
Copy link
Contributor Author

cyrgani commented Sep 6, 2024

Closing this as a duplicate, then.

@cyrgani cyrgani closed this as not planned Won't fix, can't repro, duplicate, stale Sep 6, 2024
@saethlin saethlin added C-bug Category: This is a bug. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Sep 7, 2024
@fmease fmease added the L-deprecated Lint: deprecated label Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. L-deprecated Lint: deprecated
Projects
None yet
Development

No branches or pull requests

5 participants