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

Revert the second deprecation of collections::Bound #83269

Merged
merged 1 commit into from
Mar 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions library/std/src/collections/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,10 @@
#![stable(feature = "rust1", since = "1.0.0")]

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_deprecated(reason = "moved to `std::ops::Bound`", since = "1.52.0")]
// FIXME(#82080) The deprecation here is only theoretical, and does not actually produce a warning.
#[rustc_deprecated(reason = "moved to `std::ops::Bound`", since = "1.26.0")]
Comment on lines +404 to +405
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we could tweak things slightly so that it does work - also see #83248 (comment).

The information of which imports you went through should exist during name resolution, and we'd only have to keep track of one DefId (the "nearest" pub use to the import) for deprecation checking purposes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that seem like an especially hard change? I only have rudimentary compiler knowledge, but if it's not a monumental task then I'd be willing to tackle it.

#[doc(hidden)]
pub type Bound<T> = crate::ops::Bound<T>;
pub use crate::ops::Bound;

#[stable(feature = "rust1", since = "1.0.0")]
pub use alloc_crate::collections::{binary_heap, btree_map, btree_set};
Expand Down