-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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] does not work for in-crate usages of items #16409
Comments
// stability attributes are promises made across crates; do not
// check anything for crate-local usage.
if ast_util::is_local(id) { return } This makes sense for |
I kinda wish we could have: |
Stability attributes are lints, not macros, and lints have access to the full resolution information so that's not a problem. I believe @aturon is thinking about (and may be implementing) pathed stability attributes; he and I have certainly discussed in passing previously. |
Oooh!! Exciting!! |
This is a good point; I will change the lint to warn on |
Unsurprisingly, turning this on is revealing a bunch of deprecated usage in libstd... |
Awesome, thanks! |
Previously the stability lint considered cross-crate items only. That's appropriate for unstable and experimental levels, but not for deprecation. In addition to changing the lint, this PR takes care of the fallout: a number of deprecated items that were being used throughout libstd. Closes #16409 Due to deny(deprecated), this is a: [breaking-change]
Remove unused codes Detected by rust-lang#118257
This compiles:
http://is.gd/bQE1W1
More extensive example from @chrismorgan: http://is.gd/eRBKUc
This is annoying because I would love to use it to purge old stuff from my own codebase, rather than deferring it until the removal time, and risking usages creep back in with other PRs.
The text was updated successfully, but these errors were encountered: