-
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
allow(deprecated) is too coarse-grained, should take a path #62398
Comments
In most of these cases the I would like to see stronger justification for changing the grammar of |
Me? #61879 (comment)
Deprecation lints reported early (e.g. in #62042) don't currently have have the necessary infra to suppress them locally and have to be |
I don't think this problem is specific to rustc.
I'd prefer a feature name, or something like that. |
But in these specific cases these deprecation lints are not reported early, right? (Otherwise they would have had no effect in the While from a complexity perspective (compiler + user facing) an extension to |
Hm, the only |
That's strange, the commit aforementioned has e.g.: #[allow(deprecated)]
let mut loses_info: llvm::Bool = ::std::mem::uninitialized();
No doubt, but using
I'm against any mention of feature names in the stable language for the same reason I was opposed to |
Ah, we are talking about different PRs, I was talking about #62042. |
@petrochenkov ah right, it was you. :) Sorry.
Another instance of (the equivalent of) a crate-level Line 208 in baab191
If we had finer-grained control, that could have been #![warn(deprecated_in_future)]
#![allow(deprecated_in_future(mem::uninitialized)] Generally, when updating rustc (even for your own crate) I feel it can be hard to find all the right places for where to locally |
@RalfJung In the interim, |
Not sure what you mean? That lint can also be used by user crates. But user crates can indeed not mark items as "deprecated in the future". Still, I don't know what it is you are proposing. |
I'm not really actively proposing it, but if you want to... we can add a rustc internal unstable feature gate under which you can do |
007d87f added
allow(deprecated)
in a few places becausemem::uninitialized
is still used. Unfortunately, this allows all deprecated items, so by the time someone gets around to fix that, other uses of deprecated items could have crept in.It would be much better if that could be
allow(deprecated(mem::uninitialized))
or so, to only allow the one method without also allowing everything else.The same applies to
deprecated_in_future
.I think I saw @Mark-Simulacrum ask for this somewhere recently? Or was it someone else?
The text was updated successfully, but these errors were encountered: