-
Notifications
You must be signed in to change notification settings - Fork 508
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
doc cenum_impl_drop_cast
#1713
doc cenum_impl_drop_cast
#1713
Conversation
Thanks for the PR! We generally are hesitant to document these future-incompat things until they are actually made into a hard error. In which case, it would be written as a normal rule and not a warning block. Is there a planned timeline for this? |
Based on the reference, it was a bit surprising to discover that the compiler rejects this (since rust-lang/rust#97652) without an explicit annotation, but I understand it's not technically a requirement. I wasn't sure what the reference guidelines were for such things, sorry.
On the lint's tracking issue page it appears to have been added to the "Lang Edition 2024" project, but doesn't seem to appear on the project board itself - I'm not sure if this means it was rejected from inclusion in the Edition, or somehow lost and forgotten? Either way, at this point I assume it won't be a hard error until at least the following edition. |
This comment has been minimized.
This comment has been minimized.
98d3e84
to
350536c
Compare
cenum_impl_drop_cast has been changed to a hard error in rust-lang/rust#135964
350536c
to
4675c25
Compare
I pushed an update as this is changing to a hard error via rust-lang/rust#135964. |
rust-lang/rust#135964 has merged, so I'm going to go ahead and merge this. Thanks for moving this along! |
Update books ## rust-lang/edition-guide 1 commits in f56aecc3b036dff16404b525a83b00f911b9bbea..8dbdda7cae4fa030f09f8f5b63994d4d1dde74b9 2025-02-06 20:06:58 UTC to 2025-02-06 20:06:58 UTC - Correct spelling error in `static-mut-references.md` (rust-lang/edition-guide#358) ## rust-embedded/book 1 commits in ddbf1b4e2858fedb71b7c42eb15c4576517dc125..0b8219ac23a3e09464e4e0166c768cf1c4bba0d5 2025-02-07 08:26:59 UTC to 2025-02-07 08:26:59 UTC - Update gcc toolchain download link for windows (rust-embedded/book#384) ## rust-lang/reference 3 commits in 4249fb411dd27f945e2881eb0378044b94cee06f..de2d5289e45506b11dd652bef4f99de64be70e1c 2025-02-08 22:12:20 UTC to 2025-02-06 19:02:01 UTC - Add trait_upcasting related languages changes (rust-lang/reference#1622) - fixup `»` insertion for rules (rust-lang/reference#1730) - doc `cenum_impl_drop_cast` (rust-lang/reference#1713) ## rust-lang/rust-by-example 2 commits in 743766929f1e53e72fab74394ae259bbfb4a7619..66543bbc5b7dbd4e679092c07ae06ba6c73fd912 2025-02-06 12:38:08 UTC to 2025-02-04 01:46:09 UTC - Add more examples @ drop.md (rust-lang/rust-by-example#1912) - es translation to 3100 (rust-lang/rust-by-example#1911)
Update books ## rust-lang/edition-guide 1 commits in f56aecc3b036dff16404b525a83b00f911b9bbea..8dbdda7cae4fa030f09f8f5b63994d4d1dde74b9 2025-02-06 20:06:58 UTC to 2025-02-06 20:06:58 UTC - Correct spelling error in `static-mut-references.md` (rust-lang/edition-guide#358) ## rust-embedded/book 1 commits in ddbf1b4e2858fedb71b7c42eb15c4576517dc125..0b8219ac23a3e09464e4e0166c768cf1c4bba0d5 2025-02-07 08:26:59 UTC to 2025-02-07 08:26:59 UTC - Update gcc toolchain download link for windows (rust-embedded/book#384) ## rust-lang/reference 3 commits in 4249fb411dd27f945e2881eb0378044b94cee06f..de2d5289e45506b11dd652bef4f99de64be70e1c 2025-02-08 22:12:20 UTC to 2025-02-06 19:02:01 UTC - Add trait_upcasting related languages changes (rust-lang/reference#1622) - fixup `»` insertion for rules (rust-lang/reference#1730) - doc `cenum_impl_drop_cast` (rust-lang/reference#1713) ## rust-lang/rust-by-example 2 commits in 743766929f1e53e72fab74394ae259bbfb4a7619..66543bbc5b7dbd4e679092c07ae06ba6c73fd912 2025-02-06 12:38:08 UTC to 2025-02-04 01:46:09 UTC - Add more examples @ drop.md (rust-lang/rust-by-example#1912) - es translation to 3100 (rust-lang/rust-by-example#1911)
Update books ## rust-lang/edition-guide 1 commits in f56aecc3b036dff16404b525a83b00f911b9bbea..8dbdda7cae4fa030f09f8f5b63994d4d1dde74b9 2025-02-06 20:06:58 UTC to 2025-02-06 20:06:58 UTC - Correct spelling error in `static-mut-references.md` (rust-lang/edition-guide#358) ## rust-embedded/book 1 commits in ddbf1b4e2858fedb71b7c42eb15c4576517dc125..0b8219ac23a3e09464e4e0166c768cf1c4bba0d5 2025-02-07 08:26:59 UTC to 2025-02-07 08:26:59 UTC - Update gcc toolchain download link for windows (rust-embedded/book#384) ## rust-lang/reference 3 commits in 4249fb411dd27f945e2881eb0378044b94cee06f..de2d5289e45506b11dd652bef4f99de64be70e1c 2025-02-08 22:12:20 UTC to 2025-02-06 19:02:01 UTC - Add trait_upcasting related languages changes (rust-lang/reference#1622) - fixup `»` insertion for rules (rust-lang/reference#1730) - doc `cenum_impl_drop_cast` (rust-lang/reference#1713) ## rust-lang/rust-by-example 2 commits in 743766929f1e53e72fab74394ae259bbfb4a7619..66543bbc5b7dbd4e679092c07ae06ba6c73fd912 2025-02-06 12:38:08 UTC to 2025-02-04 01:46:09 UTC - Add more examples @ drop.md (rust-lang/rust-by-example#1912) - es translation to 3100 (rust-lang/rust-by-example#1911)
Rollup merge of rust-lang#136825 - rustbot:docs-update, r=ehuss Update books ## rust-lang/edition-guide 1 commits in f56aecc3b036dff16404b525a83b00f911b9bbea..8dbdda7cae4fa030f09f8f5b63994d4d1dde74b9 2025-02-06 20:06:58 UTC to 2025-02-06 20:06:58 UTC - Correct spelling error in `static-mut-references.md` (rust-lang/edition-guide#358) ## rust-embedded/book 1 commits in ddbf1b4e2858fedb71b7c42eb15c4576517dc125..0b8219ac23a3e09464e4e0166c768cf1c4bba0d5 2025-02-07 08:26:59 UTC to 2025-02-07 08:26:59 UTC - Update gcc toolchain download link for windows (rust-embedded/book#384) ## rust-lang/reference 3 commits in 4249fb411dd27f945e2881eb0378044b94cee06f..de2d5289e45506b11dd652bef4f99de64be70e1c 2025-02-08 22:12:20 UTC to 2025-02-06 19:02:01 UTC - Add trait_upcasting related languages changes (rust-lang/reference#1622) - fixup `»` insertion for rules (rust-lang/reference#1730) - doc `cenum_impl_drop_cast` (rust-lang/reference#1713) ## rust-lang/rust-by-example 2 commits in 743766929f1e53e72fab74394ae259bbfb4a7619..66543bbc5b7dbd4e679092c07ae06ba6c73fd912 2025-02-06 12:38:08 UTC to 2025-02-04 01:46:09 UTC - Add more examples @ drop.md (rust-lang/rust-by-example#1912) - es translation to 3100 (rust-lang/rust-by-example#1911)
Add note about
as
casts being disallowed for enums that implementDrop
.The
cenum_impl_drop_cast
lint rust-lang/rust#73333 is already deny on stable rust, and I think eventually this will become a hard restriction for enum-to-numeric casts. playground