Skip to content

num: Separate public API from internal implementations#151900

Merged
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
tgross35:num-internal-imp
Mar 9, 2026
Merged

num: Separate public API from internal implementations#151900
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
tgross35:num-internal-imp

Conversation

@tgross35
Copy link
Contributor

Currently we have a single core::num module that contains both thin wrapper API and higher-complexity numeric routines. Restructure this by moving implementation details to a new imp module.

This results in a more clean separation of what is actually user-facing compared to items that have a stability attribute because they are public for testing.

The first commit does the actual change then the second moves a portion back.

@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 Jan 31, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 31, 2026

r? @scottmcm

rustbot has assigned @scottmcm.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Jan 31, 2026

triagebot.toml has been modified, there may have been changes to the review queue.

cc @davidtwco, @wesleywiser

@rustbot rustbot added the A-meta Area: Issues & PRs about the rust-lang/rust repository itself label Jan 31, 2026
@rust-log-analyzer

This comment has been minimized.

@tgross35 tgross35 force-pushed the num-internal-imp branch 2 times, most recently from 8ecf216 to 7aa5a95 Compare January 31, 2026 12:21
@rust-log-analyzer

This comment has been minimized.

@tgross35 tgross35 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 4, 2026
Currently we have a single `core::num` module that contains both thin
wrapper API and higher-complexity numeric routines. Restructure this by
moving implementation details to a new `imp` module.

This results in a more clean separation of what is actually user-facing
compared to items that have a stability attribute because they are
public for testing.
@rustbot
Copy link
Collaborator

rustbot commented Feb 11, 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-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

Follow up to the previous commit refactoring `core::num` by moving the
user-facing error types and trait implementations back out of `imp` and
into a new module under `core::num`.
@tgross35
Copy link
Contributor Author

Finally!

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 12, 2026
@tgross35 tgross35 requested a review from scottmcm February 12, 2026 04:41
@tgross35
Copy link
Contributor Author

tgross35 commented Mar 2, 2026

Think Scott has been a bit busy, so

@rustbot reroll

@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 8, 2026

📌 Commit 07537b4 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@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 Mar 8, 2026
rust-bors bot pushed a commit that referenced this pull request Mar 9, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #152535 (std: use `OnceLock` for Xous environment variables)
 - #152646 (Update `UnsafeUnpin` impls involving extern types.)
 - #153559 (Inline and simplify some code for saving incremental data to disk)
 - #151900 (num: Separate public API from internal implementations)
 - #153520 (.mailmap: fix broken line with multiple emails)
 - #153573 (rustdoc-json: fix incorrect documentation for VariantKind::Struct)

Failed merges:

 - #153509 (Cleanup unused diagnostic emission methods - part 2)
@rust-bors rust-bors bot merged commit 83e6dbf into rust-lang:main Mar 9, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 9, 2026
rust-timer added a commit that referenced this pull request Mar 9, 2026
Rollup merge of #151900 - tgross35:num-internal-imp, r=Mark-Simulacrum

num: Separate public API from internal implementations

Currently we have a single `core::num` module that contains both thin wrapper API and higher-complexity numeric routines. Restructure this by moving implementation details to a new `imp` module.

This results in a more clean separation of what is actually user-facing compared to items that have a stability attribute because they are public for testing.

The first commit does the actual change then the second moves a portion back.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-meta Area: Issues & PRs about the rust-lang/rust repository itself S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants