Skip to content

fully deprecate the legacy integral modules - #146882

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
cyrgani:deprecate-legacy-int-mods
Aug 5, 2026
Merged

fully deprecate the legacy integral modules#146882
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
cyrgani:deprecate-legacy-int-mods

Conversation

@cyrgani

@cyrgani cyrgani commented Sep 22, 2025

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

cyrgani commented Sep 22, 2025

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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
Copy Markdown
Member

@rfcbot merge

@rust-rfcbot

rust-rfcbot commented Sep 22, 2025

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Collaborator

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

@RalfJung

Copy link
Copy Markdown
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-cloud-vms
rust-cloud-vms Bot force-pushed the deprecate-legacy-int-mods branch from 356f154 to dd7b1c2 Compare July 30, 2026 09:20
@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms
rust-cloud-vms Bot force-pushed the deprecate-legacy-int-mods branch from dd7b1c2 to 0115f0e Compare July 30, 2026 11:33
@clarfonthey

clarfonthey commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Did an additional pass of review, and it looks like none of the outstanding issues still are present after rebase. This does only exactly what it mentions, which is deprecate:

  • std::{uN, iN}::{self, MIN, MAX}
  • std::fN::{RADIX, MANTISSA_DIGITS, DIGITS, etc} (but not std::fN or std::fN::consts)

Gonna nominate for next week's meeting even though this passed FCP just to verify we're cool making this happen next release, since it's been a while and people might have forgotten about it.

Once we verify that, r=clarfonthey,BurntSushi on this one.

@clarfonthey clarfonthey added S-waiting-on-t-libs-api Status: Awaiting decision from T-libs-api I-libs-api-nominated Nominated for discussion during a libs-api team meeting. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 30, 2026
@clarfonthey clarfonthey changed the title fully deprecate the legacy integral modules fully deprecate the legacy primitive modules Jul 30, 2026
@clarfonthey clarfonthey changed the title fully deprecate the legacy primitive modules fully deprecate the legacy integral modules Jul 30, 2026
@joshtriplett

Copy link
Copy Markdown
Member

@bors r+

@rust-bors

This comment was marked as outdated.

@joshtriplett joshtriplett added the relnotes Marks issues that should be documented in the release notes of the next release. label Aug 4, 2026
@clarfonthey

This comment was marked as outdated.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 4, 2026
@clarfonthey

This comment was marked as outdated.

@clarfonthey clarfonthey removed the S-waiting-on-t-libs-api Status: Awaiting decision from T-libs-api label Aug 4, 2026
@clarfonthey

Copy link
Copy Markdown
Contributor

@bors r=clarfonthey,BurntSushi,joshtriplett

@rust-bors

rust-bors Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 0115f0e has been approved by clarfonthey,BurntSushi,joshtriplett

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 10. This pull request will be tested once the tree is reopened.

Reason for tree closure: manually handling queue due to backlog

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 4, 2026
@Mark-Simulacrum Mark-Simulacrum removed the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Aug 4, 2026
rust-bors Bot pushed a commit that referenced this pull request Aug 5, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #160426 (`rust-analyzer` subtree update)
 - #160372 (Derive the allocator used by tools from rustc's allocator)
 - #146882 (fully deprecate the legacy integral modules)
 - #158727 (std: use `readdir` on nearly all UNIX platforms)
 - #159727 (Various steps in moving away from the big reflection enum to reflection functions)
 - #160443 (normalize in relations, not generalize, when relating infer with alias)
 - #160457 (implement -Zllvm-target-feature)
 - #160480 (Single-pass ASCII lower/upper case conversion)
 - #160502 (Reduce number of miri tests executed on PR CI)
 - #157430 (std::random: use little-endian for reproducibility)
 - #158110 (fix macro attribute feature-gate span)
 - #159975 (Use real ThinVec in StmtDebugInfos)
 - #160001 (Suggest mutable method when iterating over binding)
 - #160024 (Fix mono reachability with no-op landing pads)
 - #160154 (Add regression test for HRTB associated type projection closure)
 - #160176 (No more `tests/ui/issues`!)
 - #160326 (Remove hidden_glob_reexports)
 - #160407 (Add regression tests for a number of ICEs and diagnostics issues labelled `E-needs-test`)
 - #160430 (bootstrap: Don't produce mutated/filtered PathSets during command-line matching)
 - #160472 (Minor fixes to `core::io` & `alloc::io` Documentation)
 - #160486 (Remove unused `FreeRegionsVisitor`)
 - #160496 (clarify non-determinism docs for algebraic operations)

Failed merges:

 - #160501 (Add bootstrap CLI snapshot test for testing miri)
@rust-bors
rust-bors Bot merged commit e1d8b7c into rust-lang:main Aug 5, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Aug 5, 2026
rust-timer added a commit that referenced this pull request Aug 5, 2026
Rollup merge of #146882 - cyrgani:deprecate-legacy-int-mods, r=clarfonthey,BurntSushi,joshtriplett

fully deprecate the legacy integral modules

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
RalfJung pushed a commit to rust-lang/miri that referenced this pull request Aug 5, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - rust-lang/rust#160426 (`rust-analyzer` subtree update)
 - rust-lang/rust#160372 (Derive the allocator used by tools from rustc's allocator)
 - rust-lang/rust#146882 (fully deprecate the legacy integral modules)
 - rust-lang/rust#158727 (std: use `readdir` on nearly all UNIX platforms)
 - rust-lang/rust#159727 (Various steps in moving away from the big reflection enum to reflection functions)
 - rust-lang/rust#160443 (normalize in relations, not generalize, when relating infer with alias)
 - rust-lang/rust#160457 (implement -Zllvm-target-feature)
 - rust-lang/rust#160480 (Single-pass ASCII lower/upper case conversion)
 - rust-lang/rust#160502 (Reduce number of miri tests executed on PR CI)
 - rust-lang/rust#157430 (std::random: use little-endian for reproducibility)
 - rust-lang/rust#158110 (fix macro attribute feature-gate span)
 - rust-lang/rust#159975 (Use real ThinVec in StmtDebugInfos)
 - rust-lang/rust#160001 (Suggest mutable method when iterating over binding)
 - rust-lang/rust#160024 (Fix mono reachability with no-op landing pads)
 - rust-lang/rust#160154 (Add regression test for HRTB associated type projection closure)
 - rust-lang/rust#160176 (No more `tests/ui/issues`!)
 - rust-lang/rust#160326 (Remove hidden_glob_reexports)
 - rust-lang/rust#160407 (Add regression tests for a number of ICEs and diagnostics issues labelled `E-needs-test`)
 - rust-lang/rust#160430 (bootstrap: Don't produce mutated/filtered PathSets during command-line matching)
 - rust-lang/rust#160472 (Minor fixes to `core::io` & `alloc::io` Documentation)
 - rust-lang/rust#160486 (Remove unused `FreeRegionsVisitor`)
 - rust-lang/rust#160496 (clarify non-determinism docs for algebraic operations)

Failed merges:

 - rust-lang/rust#160501 (Add bootstrap CLI snapshot test for testing miri)
@cyrgani
cyrgani deleted the deprecate-legacy-int-mods branch August 5, 2026 07:45
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. relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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