Make std/src/num mirror core/src/num by tgross35 · Pull Request #137574 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

tgross35

The float modules in std are currently top-level but for core, they are nested within the num directory and referenced by #[path = ...]. For consistency, adjust std to use the same structure as core.

Also change the f16 and f128 gates from outer attributes to inner attributes like core has.

@rustbot

r? @workingjubilee

rustbot has assigned @workingjubilee.
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

@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

Feb 25, 2025

@bors

@workingjubilee

??? why didn't I see this in my queue on previous checks?

@workingjubilee

oh wait, I see, I remember...

...uh, can we just pub use $path in appropriate locations?

I think I withheld comment because I was going to take a closer look to validate whether that was doable before I left the review comment, but that was an inappropriate delay and I should have left the comment, then doublechecked if I had spare energy. Sorry.

@tgross35

The float modules in std are currently top-level but for core, they are nested within the num directory and referenced by #[path = ...]. For consistency, adjust std to use the same structure as core.

Also change the f16 and f128 gates from outer attributes to inner attributes like core has.

@tgross35

...uh, can we just pub use $path in appropriate locations?

Wondered about this too, I think it is because std::num is public so std::num::f32 and similar would also be public to reexport and we don't want that. It would be possible to move these into a new nonpublic {core, std}::float, but 🤷 since it's mostly for file organization. I have no preference here, so your call.

@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

Apr 8, 2025

@bors

@workingjubilee

oh okay.
sorry about not approving it in the meantime before the PR that required rebase for this... unbased it?

@workingjubilee

r=me with rebase assuming nothing changes wildly

@workingjubilee

@rustbot

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot rustbot added the S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

label

May 1, 2025

Labels

S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

T-libs

Relevant to the library team, which will review and decide on the PR/issue.