Closed
Description
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?