Skip to content

Commit 7fa7a70

Browse files
committed
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.
1 parent 617aad8 commit 7fa7a70

File tree

6 files changed

+8
-2
lines changed

6 files changed

+8
-2
lines changed

library/std/src/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -578,11 +578,13 @@ pub use alloc_crate::string;
578578
#[stable(feature = "rust1", since = "1.0.0")]
579579
pub use alloc_crate::vec;
580580

581-
#[unstable(feature = "f128", issue = "116909")]
581+
#[path = "num/f128.rs"]
582582
pub mod f128;
583-
#[unstable(feature = "f16", issue = "116909")]
583+
#[path = "num/f16.rs"]
584584
pub mod f16;
585+
#[path = "num/f32.rs"]
585586
pub mod f32;
587+
#[path = "num/f64.rs"]
586588
pub mod f64;
587589

588590
#[macro_use]

library/std/src/f128.rs renamed to library/std/src/num/f128.rs

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
//!
55
//! Mathematically significant numbers are provided in the `consts` sub-module.
66
7+
#![unstable(feature = "f128", issue = "116909")]
8+
79
#[unstable(feature = "f128", issue = "116909")]
810
pub use core::f128::consts;
911

library/std/src/f16.rs renamed to library/std/src/num/f16.rs

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
//!
55
//! Mathematically significant numbers are provided in the `consts` sub-module.
66
7+
#![unstable(feature = "f16", issue = "116909")]
8+
79
#[unstable(feature = "f16", issue = "116909")]
810
pub use core::f16::consts;
911

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)