Make std/src/num mirror core/src/num

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.
This commit is contained in:
Trevor Gross
2025-02-24 19:49:15 -05:00
parent 8afd71079a
commit a5f3b1e5df
6 changed files with 8 additions and 2 deletions

View File

@@ -585,11 +585,13 @@ pub use alloc_crate::string;
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub use alloc_crate::vec; pub use alloc_crate::vec;
#[unstable(feature = "f128", issue = "116909")] #[path = "num/f128.rs"]
pub mod f128; pub mod f128;
#[unstable(feature = "f16", issue = "116909")] #[path = "num/f16.rs"]
pub mod f16; pub mod f16;
#[path = "num/f32.rs"]
pub mod f32; pub mod f32;
#[path = "num/f64.rs"]
pub mod f64; pub mod f64;
#[macro_use] #[macro_use]

View File

@@ -4,6 +4,8 @@
//! //!
//! Mathematically significant numbers are provided in the `consts` sub-module. //! Mathematically significant numbers are provided in the `consts` sub-module.
#![unstable(feature = "f128", issue = "116909")]
#[unstable(feature = "f128", issue = "116909")] #[unstable(feature = "f128", issue = "116909")]
pub use core::f128::consts; pub use core::f128::consts;

View File

@@ -4,6 +4,8 @@
//! //!
//! Mathematically significant numbers are provided in the `consts` sub-module. //! Mathematically significant numbers are provided in the `consts` sub-module.
#![unstable(feature = "f16", issue = "116909")]
#[unstable(feature = "f16", issue = "116909")] #[unstable(feature = "f16", issue = "116909")]
pub use core::f16::consts; pub use core::f16::consts;