Uh oh!
There was an error while loading. Please reload this page.
Deprecate intrinsics::drop_in_place and collections::Bound, which accidentally weren't deprecated - #82122
Conversation
rust-highfive
commented
Feb 14, 2021
r? @dtolnay (rust-highfive has picked a reviewer for you, use r? to override) |
bstrie
commented
Feb 14, 2021
Note that this might not necessarily "fix" #82080 if you happen to think that rustc_deprecated should "just work" on re-exports, but this is a far more expedient fix to the current problem. |
This comment has been minimized.
This comment has been minimized.
dtolnay
commented
Feb 14, 2021
@bors r+ |
bors
commented
Feb 14, 2021
📌 Commit dfae9f0077de752ec9c00f6625c65cab202366b3 has been approved by |
dtolnay
commented
Feb 14, 2021
It looks like 2021-02-14T23:40:28.5030915Z tidy check2021-02-14T23:40:28.8226072Z * 624 error codes2021-02-14T23:40:28.8227914Z * highest error code: E07812021-02-14T23:40:28.8228436Z Checking which error codes lack tests...2021-02-14T23:40:29.0131586Z Found 436 error codes2021-02-14T23:40:29.0132273Z Found 0 error codes with no tests2021-02-14T23:40:29.0132741Z Done!2021-02-14T23:40:30.1846989Z tidy error: /checkout/library/core/src/intrinsics.rs:72: undocumented unsafe2021-02-14T23:40:32.0135064Z some tidy checks failed@bors r- |
jyn514
commented
Feb 15, 2021
Could you open a separate issue for making |
dtolnay
commented
Feb 15, 2021
@bors r+ |
bors
commented
Feb 15, 2021
📌 Commit c813b38ec04eae0108cfb14312be8e4348dc0d27 has been approved by |
bstrie
commented
Feb 15, 2021
I've opened #82123 to track fixing the behavior of |
This comment has been minimized.
This comment has been minimized.
bstrie
commented
Feb 15, 2021
Oof, I'll take a look at that. |
jyn514
commented
Feb 15, 2021
@bors r- |
bstrie
commented
Feb 15, 2021
Ok, when I first saw that this patch was changing the output of some UI tests I was concerned that codegen was secretly referring to |
jyn514
commented
Feb 15, 2021
That sounds right, yeah, I think that's what was implemented in #73996. |
This comment has been minimized.
This comment has been minimized.
bstrie
commented
Feb 15, 2021
Ok, so I assume that the mir output being diffed here is only for human consumption, and that the new fully-qualified path being shown for But fascinatingly, one of the failing MIR tests does contain an explicit reference to While we're at it, I'm just grepping for |
Dylan-DPC-zz
commented
Mar 10, 2021
@jyn514 this was in the error as well: |
bstrie
commented
Mar 16, 2021
I've updated Clippy; ready for re-approval. |
Dylan-DPC-zz
commented
Mar 16, 2021
@bors r=dtolnay |
bors
commented
Mar 16, 2021
📌 Commit 49aa79e has been approved by |
bors
commented
Mar 17, 2021
bors
commented
Mar 17, 2021
☀️ Test successful - checks-actions |
Tested on commit rust-lang/rust@36f1f04. Direct link to PR: <rust-lang/rust#82122> 💔 miri on windows: test-pass → build-fail (cc @eddyb@oli-obk@RalfJung). 💔 miri on linux: test-pass → build-fail (cc @eddyb@oli-obk@RalfJung).
Replace deprecated `collections::Bound` with `ops::Bound` Fixesrust-lang/rust#83242 , which resulted from rust-lang/rust#82122 .
Replace deprecated `collections::Bound` with `ops::Bound` Cc rust-lang/rust#83242 , which resulted from rust-lang/rust#82122 .
| #[rustc_deprecated(reason = "moved to `std::ops::Bound`", since = "1.52.0")] | ||
| #[doc(hidden)] | ||
| pub use crate::ops::Bound; | ||
| pub type Bound<T> = crate::ops::Bound<T>; |
There was a problem hiding this comment.
FWIW, this is technically a breaking change if someone did use std::collections::Bound::*; (like Miri did)
There was a problem hiding this comment.
Oh, I assumed miri had broken due to denying deprecation warnings. I wasn't aware that type aliases to enums couldn't glob-import; it looks like even concrete importing like use collections::Bound::Unbounded isn't supported. :\ This is a distressing limitation of type alises that I wasn't aware of; I trusted that the limitations laid out in the reference were exhaustive. I'm not sure what to do about this. At the very least I'll file an issue about supporting this, since it really does seem like a bug in type aliases.
There was a problem hiding this comment.
I've filed #83248 to track importing variants through type aliases. I'll also ping the libs team on Zulip to see what they think should be done.
There was a problem hiding this comment.
There was a problem hiding this comment.
I trusted that the limitations laid out in the reference were exhaustive.
Which part of the reference is that? Might be worth reporting a bug (or submitting a PR).
There was a problem hiding this comment.
This page of the reference: https://doc.rust-lang.org/reference/items/type-aliases.html , at the bottom where it talks about where type aliases cannot be used. I'll submit a PR.
Revert the second deprecation of collections::Bound Per the review at rust-lang#82122 (comment) and the decision at https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/unavoidable.20breakage.20when.20deprecating.20an.20enum.3F , revert this small portion of rust-lang#82122 for the time being. This doesn't affect the other components of that patch, i.e. `intrinsics::drop_in_place` is still deprecated-for-real, and uses of `collections::Bound` remain removed from the repo.
Revert the second deprecation of collections::Bound Per the review at rust-lang#82122 (comment) and the decision at https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/unavoidable.20breakage.20when.20deprecating.20an.20enum.3F , revert this small portion of rust-lang#82122 for the time being. This doesn't affect the other components of that patch, i.e. `intrinsics::drop_in_place` is still deprecated-for-real, and uses of `collections::Bound` remain removed from the repo.
Deprecate `intrinsics::drop_in_place` and `collections::Bound`, which accidentally weren't deprecated Fixesrust-lang#82080. I've taken the liberty of updating the `since` values to 1.52, since an unobservable deprecation isn't much of a deprecation (even the detailed release notes never bothered to mention these deprecations). As mentioned in the issue I'm *pretty* sure that using a type alias for `Bound` is semantically equivalent to the re-export; [the reference implies](https://doc.rust-lang.org/reference/items/type-aliases.html) that type aliases only observably differ from types when used on unit structs or tuple structs, whereas `Bound` is an enum.
Fixes#82080.
I've taken the liberty of updating the
sincevalues to 1.52, since an unobservable deprecation isn't much of a deprecation (even the detailed release notes never bothered to mention these deprecations).As mentioned in the issue I'm pretty sure that using a type alias for
Boundis semantically equivalent to the re-export; the reference implies that type aliases only observably differ from types when used on unit structs or tuple structs, whereasBoundis an enum.