You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add allow-by-default lint when using item deprecated in the future #55892
With #30785 resolved, there now is a way to deprecate an item "for the future". It would be nice to be able to e.g. clean libstd from using such future-deprecated items and then to make sure that future PRs will not re-introduce new uses of that item again. I am thinking, for example, of when we will deprecate mem::uninitialized in favor of MaybeUninit: Once we got rid of all its uses in some crate here, we'll want to make sure people not aware of this deprecation do not accidentally reintroduce new uses of mem::uninitialized in libstd.
So maybe we could have an allow-by-default lint that libstd (and its dependencies) opt in to that complains about using items that are marked for future deprecation?
Activity
varkor commentedon Nov 12, 2018
This should be very straightforward to add by essentially copying what the current
deprecatedlint does, but limited to future deprecations.https://github.com/rust-lang/rust/blob/d6828cefd3787e8a732991d6273afc8793104cc3/src/librustc/lint/builtin.rs#L217-L222
I can provide more detailed mentoring for those interested in tackling the issue, but I imagine one should be able to figure out the details without too much trouble.
mominul commentedon Nov 13, 2018
I'd like to take this issue! If I get struck, I'll ask on the discord channel.
RalfJung commentedon Nov 14, 2018
Awesome, and please do :)
mominul commentedon Nov 19, 2018
Sorry, I got quite busy in my studies. If anyone wants to take this issue in the meantime, please do!
aheart commentedon Nov 24, 2018
I would like to give this a try.
FrankSD commentedon Dec 5, 2018
Can i take this issue?
RalfJung commentedon Dec 5, 2018
I'm afraid it is already taken: #56203
Rollup merge of rust-lang#56203 - aheart:master, r=varkor
Rollup merge of rust-lang#56203 - aheart:master, r=varkor
Rollup merge of rust-lang#56203 - aheart:master, r=varkor
Rollup merge of rust-lang#56203 - aheart:master, r=varkor
Rollup merge of rust-lang#56203 - aheart:master, r=varkor
Rollup merge of rust-lang#56203 - aheart:master, r=varkor
Rollup merge of rust-lang#56203 - aheart:master, r=varkor
Rollup merge of rust-lang#56203 - aheart:master, r=varkor
Auto merge of #56203 - aheart:master, r=varkor