Rollup merge of #137574 - tgross35:std-float-reorganization, r=workingjubilee

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:
Guillaume Gomez
2025-05-29 17:02:57 +02:00
committed by GitHub
6 changed files with 8 additions and 2 deletions
+4 -2
View File
@@ -585,11 +585,13 @@
#[stable(feature = "rust1", since = "1.0.0")]
pub use alloc_crate::vec;
#[unstable(feature = "f128", issue = "116909")]
#[path = "num/f128.rs"]
pub mod f128;
#[unstable(feature = "f16", issue = "116909")]
#[path = "num/f16.rs"]
pub mod f16;
#[path = "num/f32.rs"]
pub mod f32;
#[path = "num/f64.rs"]
pub mod f64;
#[macro_use]
@@ -4,6 +4,8 @@
//!
//! Mathematically significant numbers are provided in the `consts` sub-module.
#![unstable(feature = "f128", issue = "116909")]
#[unstable(feature = "f128", issue = "116909")]
pub use core::f128::consts;
@@ -4,6 +4,8 @@
//!
//! Mathematically significant numbers are provided in the `consts` sub-module.
#![unstable(feature = "f16", issue = "116909")]
#[unstable(feature = "f16", issue = "116909")]
pub use core::f16::consts;