diff options
| author | Linus Färnstrand <faern@faern.net> | 2020-02-10 19:45:44 +0100 |
|---|---|---|
| committer | Linus Färnstrand <faern@faern.net> | 2020-02-12 20:20:56 +0100 |
| commit | c67de2570f881a0601f15c7c15e1fb9a26f2d3bf (patch) | |
| tree | 37597444b5ec85d71f70b008c651aae5c82b6307 | |
| parent | 847a0dd845dbc74b4d49adf873c585519e356b4e (diff) | |
| download | rust-c67de2570f881a0601f15c7c15e1fb9a26f2d3bf.tar.gz rust-c67de2570f881a0601f15c7c15e1fb9a26f2d3bf.zip | |
Add notice about using new consts in new code on float modules
| -rw-r--r-- | src/libcore/num/f32.rs | 3 | ||||
| -rw-r--r-- | src/libcore/num/f64.rs | 3 | ||||
| -rw-r--r-- | src/libstd/f32.rs | 3 | ||||
| -rw-r--r-- | src/libstd/f64.rs | 3 | ||||
| -rw-r--r-- | src/libstd/primitive_docs.rs | 4 |
5 files changed, 14 insertions, 2 deletions
diff --git a/src/libcore/num/f32.rs b/src/libcore/num/f32.rs index 99df846c095..ee3e09f3577 100644 --- a/src/libcore/num/f32.rs +++ b/src/libcore/num/f32.rs @@ -4,6 +4,9 @@ //! *[See also the `f32` primitive type](../../std/primitive.f32.html).* //! //! Mathematically significant numbers are provided in the `consts` sub-module. +//! +//! Although using these constants won’t cause compilation warnings, +//! new code should use the associated constants directly on the primitive type. #![stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcore/num/f64.rs b/src/libcore/num/f64.rs index 63caffc19c6..40c1cee1d2d 100644 --- a/src/libcore/num/f64.rs +++ b/src/libcore/num/f64.rs @@ -4,6 +4,9 @@ //! *[See also the `f64` primitive type](../../std/primitive.f64.html).* //! //! Mathematically significant numbers are provided in the `consts` sub-module. +//! +//! Although using these constants won’t cause compilation warnings, +//! new code should use the associated constants directly on the primitive type. #![stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libstd/f32.rs b/src/libstd/f32.rs index 941ea6a767c..20425aea8d5 100644 --- a/src/libstd/f32.rs +++ b/src/libstd/f32.rs @@ -4,6 +4,9 @@ //! *[See also the `f32` primitive type](../../std/primitive.f32.html).* //! //! Mathematically significant numbers are provided in the `consts` sub-module. +//! +//! Although using these constants won’t cause compilation warnings, +//! new code should use the associated constants directly on the primitive type. #![stable(feature = "rust1", since = "1.0.0")] #![allow(missing_docs)] diff --git a/src/libstd/f64.rs b/src/libstd/f64.rs index d89b38e1a00..a1128a589a6 100644 --- a/src/libstd/f64.rs +++ b/src/libstd/f64.rs @@ -4,6 +4,9 @@ //! *[See also the `f64` primitive type](../../std/primitive.f64.html).* //! //! Mathematically significant numbers are provided in the `consts` sub-module. +//! +//! Although using these constants won’t cause compilation warnings, +//! new code should use the associated constants directly on the primitive type. #![stable(feature = "rust1", since = "1.0.0")] #![allow(missing_docs)] diff --git a/src/libstd/primitive_docs.rs b/src/libstd/primitive_docs.rs index b6bd709efe7..adad90f56d1 100644 --- a/src/libstd/primitive_docs.rs +++ b/src/libstd/primitive_docs.rs @@ -771,7 +771,7 @@ mod prim_tuple {} #[doc(primitive = "f32")] /// The 32-bit floating point type. /// -/// *[See also the `std::f32` module](f32/index.html).* +/// *[See also the `std::f32::consts` module](f32/consts/index.html).* /// #[stable(feature = "rust1", since = "1.0.0")] mod prim_f32 {} @@ -780,7 +780,7 @@ mod prim_f32 {} // /// The 64-bit floating point type. /// -/// *[See also the `std::f64` module](f64/index.html).* +/// *[See also the `std::f64::consts` module](f64/consts/index.html).* /// #[stable(feature = "rust1", since = "1.0.0")] mod prim_f64 {} |
