-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Prepare for stabilizing libcore #27871
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
Conversation
All of the modules in the standard library were just straight reexports of those in libcore, so remove all the "macro modules" from the standard library and just reexport what's in core directly.
This mirrors the same hierarchy in the standard library.
|
(rust_highfive has picked a reviewer for you, use r? to override) |
|
r? @aturon |
63eb461 to
a19fa1f
Compare
src/libcoretest/num/flt2dec/mod.rs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the point of this? Nobody is ever going to generate docs for libcoretest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh oops I thought this was libcore, looks like this already exists in libcore!
This commit stabilizes the prelude::v1 module of libcore after verifying that it's a subset of the prelude of the standard library with the addition of a few extension traits.
Stop using stability to hide the implementation details of ParseFloatError and
instead move the error type into the `dec2flt` module. Also move the
implementation blocks of `FromStr for f{32,64}` into `dec2flt` directly.
a19fa1f to
a2b932c
Compare
|
@bors: r+ |
|
📌 Commit a2b932c has been approved by |
|
⌛ Testing commit a2b932c with merge 94ee3b5... |
These commits move libcore into a state so that it's ready for stabilization, performing some minor cleanup: * The primitive modules for integers in the standard library were all removed from the source tree as they were just straight reexports of the libcore variants. * The `core::atomic` module now lives in `core::sync::atomic`. The `core::sync` module is otherwise empty, but ripe for expansion! * The `core::prelude::v1` module was stabilized after auditing that it is a subset of the standard library's prelude plus some primitive extension traits (char, str, and slice) * Some unstable-hacks for float parsing errors were shifted around to not use the same unstable hacks (e.g. the `flt2dec` module is now used for "privacy"). After this commit, the remaining large unstable functionality specific to libcore is: * `raw`, `intrinsics`, `nonzero`, `array`, `panicking`, `simd` -- these modules are all unstable or not reexported in the standard library, so they're just remaining in the same status quo as before * `num::Float` - this extension trait for floats needs to be audited for functionality (much of that is happening in #27823) and may also want to be renamed to `FloatExt` or `F32Ext`/`F64Ext`. * Should the extension traits for primitives be stabilized in libcore? I believe other unstable pieces are not isolated to just libcore but also affect the standard library. cc #27701
These commits move libcore into a state so that it's ready for stabilization, performing some minor cleanup:
core::atomicmodule now lives incore::sync::atomic. Thecore::syncmodule is otherwise empty, but ripe for expansion!core::prelude::v1module was stabilized after auditing that it is a subset of the standard library's prelude plus some primitive extension traits (char, str, and slice)flt2decmodule is now used for "privacy").After this commit, the remaining large unstable functionality specific to libcore is:
raw,intrinsics,nonzero,array,panicking,simd-- these modules are all unstable or not reexported in the standard library, so they're just remaining in the same status quo as beforenum::Float- this extension trait for floats needs to be audited for functionality (much of that is happening in Remove dependencies on libm functions from libcore. #27823) and may also want to be renamed toFloatExtorF32Ext/F64Ext.I believe other unstable pieces are not isolated to just libcore but also affect the standard library.
cc #27701