Skip to content

Commit e00fa2f

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 f820b75 commit e00fa2f

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
@@ -582,11 +582,13 @@ pub use alloc_crate::string;
582582
#[stable(feature = "rust1", since = "1.0.0")]
583583
pub use alloc_crate::vec;
584584

585-
#[unstable(feature = "f128", issue = "116909")]
585+
#[path = "num/f128.rs"]
586586
pub mod f128;
587-
#[unstable(feature = "f16", issue = "116909")]
587+
#[path = "num/f16.rs"]
588588
pub mod f16;
589+
#[path = "num/f32.rs"]
589590
pub mod f32;
591+
#[path = "num/f64.rs"]
590592
pub mod f64;
591593

592594
#[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)