Skip to content

fully deprecate the legacy integral modules#146882

Open
cyrgani wants to merge 1 commit intorust-lang:mainfrom
cyrgani:deprecate-legacy-int-mods
Open

fully deprecate the legacy integral modules#146882
cyrgani wants to merge 1 commit intorust-lang:mainfrom
cyrgani:deprecate-legacy-int-mods

Conversation

@cyrgani
Copy link
Contributor

@cyrgani cyrgani commented Sep 22, 2025

View all comments

This PR implements the last step of #68490: marking the std::u8 etc. modules and the constants in std::f32 and std::f64 (but not the undeprecated consts submodule) as fully deprecated.

Revival of #107587 (cc @tgross35).

Closes: #68490

r? libs-api

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 22, 2025
@cyrgani cyrgani added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 22, 2025
@rust-log-analyzer

This comment has been minimized.

@BurntSushi
Copy link
Member

I'm still kind of meh on these deprecations personally, but we should probably finish what was started.

With that said, I'm strongly opposed to applying #[doc(hidden)] to deprecated items. I'm not sure why you're doing that here. It seems like an obviously bad user experience that only serves to gaslight users. Imagine reading old code, wondering what a function does and then going to look it up in the docs only to find that... it isn't there?

Once the #[doc(hidden)] attributes are removed, I'd be happy to kick off an FCP.

@cyrgani cyrgani force-pushed the deprecate-legacy-int-mods branch from 438bfa3 to 7fa9c6a Compare September 22, 2025 13:11
@rust-log-analyzer

This comment has been minimized.

@cyrgani
Copy link
Contributor Author

cyrgani commented Sep 22, 2025

I've removed the #[doc(hidden] attributes.
Regarding why I added them, it is mostly the feeling that having twelve deprecated modules right on the front page of the std documentation is not a good user experience either.
Also, people who would search the docs for core::u8::MAX would still get u8::MAX as their first search result to find out what the constant means.

@cyrgani cyrgani changed the title fully deprecate and hide the legacy integral modules fully deprecate the legacy integral modules Sep 22, 2025
@BurntSushi
Copy link
Member

Regarding why I added them, it is mostly the feeling that having twelve deprecated modules right on the front page of the std documentation is not a good user experience either.

Perhaps! But the solution is definitely not to completely hide them.

Also, people who would search the docs for core::u8::MAX would still get u8::MAX as their first search result to find out what the constant means.

Sure, same thing applies here. I don't know anything about how rustdoc's search result ranking works, but it seems reasonable that it could take deprecation status into account.

@BurntSushi
Copy link
Member

@rfcbot merge

@rust-rfcbot
Copy link
Collaborator

rust-rfcbot commented Sep 22, 2025

Team member @BurntSushi has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Sep 22, 2025
tgross35 pushed a commit to rust-lang/compiler-builtins that referenced this pull request Sep 22, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Oct 9, 2025
…mdev

give a better example why `std` modules named like primitives are needed

A small update to the `std` `lib.rs` introduction to replace mentions of `std::i32` (never needed) with `std::char` (sometimes needed).
Related to rust-lang#146882.
Zalathar added a commit to Zalathar/rust that referenced this pull request Oct 9, 2025
…mdev

give a better example why `std` modules named like primitives are needed

A small update to the `std` `lib.rs` introduction to replace mentions of `std::i32` (never needed) with `std::char` (sometimes needed).
Related to rust-lang#146882.
rust-timer added a commit that referenced this pull request Oct 9, 2025
Rollup merge of #147373 - cyrgani:cyrgani-patch-1, r=ibraheemdev

give a better example why `std` modules named like primitives are needed

A small update to the `std` `lib.rs` introduction to replace mentions of `std::i32` (never needed) with `std::char` (sometimes needed).
Related to #146882.
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Oct 10, 2025
…mdev

give a better example why `std` modules named like primitives are needed

A small update to the `std` `lib.rs` introduction to replace mentions of `std::i32` (never needed) with `std::char` (sometimes needed).
Related to rust-lang#146882.
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Oct 13, 2025
give a better example why `std` modules named like primitives are needed

A small update to the `std` `lib.rs` introduction to replace mentions of `std::i32` (never needed) with `std::char` (sometimes needed).
Related to rust-lang/rust#146882.
@rust-rfcbot rust-rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Oct 15, 2025
@rust-rfcbot
Copy link
Collaborator

🔔 This is now entering its final comment period, as per the review above. 🔔

@RalfJung
Copy link
Member

marking the std::u8 etc. modules as fully deprecated and as #[doc(hidden)].

It seems the doc(hidden) part got removed; please also update the PR description since it will permanently become part pf the git history.

@rust-rfcbot rust-rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Oct 25, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the deprecate-legacy-int-mods branch from ddd855f to 5ecd92b Compare December 25, 2025 14:44
@rustbot
Copy link
Collaborator

rustbot commented Dec 25, 2025

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

@rustbot rustbot added the T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. label Dec 25, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the deprecate-legacy-int-mods branch from 5ecd92b to 6002eba Compare December 25, 2025 18:38
@rustbot
Copy link
Collaborator

rustbot commented Dec 25, 2025

stdarch is developed in its own repository. If possible, consider making this change to rust-lang/stdarch instead.

cc @Amanieu, @folkertdev, @sayantn

@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the deprecate-legacy-int-mods branch from 6002eba to e7e27f5 Compare December 25, 2025 20:58
@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the deprecate-legacy-int-mods branch from e7e27f5 to bde8767 Compare December 25, 2025 22:08
@rustbot
Copy link
Collaborator

rustbot commented Dec 25, 2025

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rustbot rustbot added the T-clippy Relevant to the Clippy team. label Dec 25, 2025
@rust-cloud-vms rust-cloud-vms bot force-pushed the deprecate-legacy-int-mods branch from bde8767 to 1767156 Compare December 26, 2025 18:33
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Jan 29, 2026
tgross35 pushed a commit to rust-lang/compiler-builtins that referenced this pull request Jan 31, 2026
@rust-bors

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the deprecate-legacy-int-mods branch from 1767156 to 35e1fab Compare February 14, 2026 13:28
@rustbot
Copy link
Collaborator

rustbot commented Feb 14, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-bors

This comment has been minimized.

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
remove usages of to-be-deprecated numeric constants

Split out from rust-lang#146882.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
remove usages of to-be-deprecated numeric constants

Split out from rust-lang#146882.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
remove usages of to-be-deprecated numeric constants

Split out from rust-lang#146882.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 23, 2026
remove usages of to-be-deprecated numeric constants

Split out from rust-lang#146882.
@rust-cloud-vms rust-cloud-vms bot force-pushed the deprecate-legacy-int-mods branch from 35e1fab to a469767 Compare March 24, 2026 09:42
@rust-cloud-vms rust-cloud-vms bot force-pushed the deprecate-legacy-int-mods branch from a469767 to ffe1f14 Compare March 24, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tracking issue for RFC 2700: numeric constants as associated consts

8 participants