diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2015-07-27 10:50:19 -0400 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2015-07-27 12:28:13 -0400 |
| commit | ba5fcb726fb88cc8393f48c9f46ba03fcadf0511 (patch) | |
| tree | abbbe227f14e6553d47201ad533e8d5b91fa4672 /src/libstd/num | |
| parent | d019a49ac86322703e1daad0ebca393856185b32 (diff) | |
| download | rust-ba5fcb726fb88cc8393f48c9f46ba03fcadf0511.tar.gz rust-ba5fcb726fb88cc8393f48c9f46ba03fcadf0511.zip | |
Show appropriate feature flags in docs
Diffstat (limited to 'src/libstd/num')
| -rw-r--r-- | src/libstd/num/f32.rs | 18 | ||||
| -rw-r--r-- | src/libstd/num/f64.rs | 11 |
2 files changed, 19 insertions, 10 deletions
diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs index 9d0b9c3bbb4..73d6639cf00 100644 --- a/src/libstd/num/f32.rs +++ b/src/libstd/num/f32.rs @@ -235,7 +235,8 @@ impl f32 { /// The floating point encoding is documented in the [Reference][floating-point]. /// /// ``` - /// # #![feature(float_extras)] + /// #![feature(float_extras)] + /// /// use std::f32; /// /// let num = 2.0f32; @@ -598,7 +599,8 @@ impl f32 { /// Converts radians to degrees. /// /// ``` - /// # #![feature(float_extras)] + /// #![feature(float_extras)] + /// /// use std::f32::{self, consts}; /// /// let angle = consts::PI; @@ -614,7 +616,8 @@ impl f32 { /// Converts degrees to radians. /// /// ``` - /// # #![feature(float_extras)] + /// #![feature(float_extras)] + /// /// use std::f32::{self, consts}; /// /// let angle = 180.0f32; @@ -630,7 +633,8 @@ impl f32 { /// Constructs a floating point number of `x*2^exp`. /// /// ``` - /// # #![feature(float_extras)] + /// #![feature(float_extras)] + /// /// use std::f32; /// // 3*2^2 - 12 == 0 /// let abs_difference = (f32::ldexp(3.0, 2) - 12.0).abs(); @@ -651,7 +655,8 @@ impl f32 { /// * `0.5 <= abs(x) < 1.0` /// /// ``` - /// # #![feature(float_extras)] + /// #![feature(float_extras)] + /// /// use std::f32; /// /// let x = 4.0f32; @@ -679,7 +684,8 @@ impl f32 { /// `other`. /// /// ``` - /// # #![feature(float_extras)] + /// #![feature(float_extras)] + /// /// use std::f32; /// /// let x = 1.0f32; diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs index 4f2f59659ac..3911d276b0f 100644 --- a/src/libstd/num/f64.rs +++ b/src/libstd/num/f64.rs @@ -191,7 +191,8 @@ impl f64 { /// The floating point encoding is documented in the [Reference][floating-point]. /// /// ``` - /// # #![feature(float_extras)] + /// #![feature(float_extras)] + /// /// let num = 2.0f64; /// /// // (8388608, -22, 1) @@ -568,7 +569,8 @@ impl f64 { /// Constructs a floating point number of `x*2^exp`. /// /// ``` - /// # #![feature(float_extras)] + /// #![feature(float_extras)] + /// /// // 3*2^2 - 12 == 0 /// let abs_difference = (f64::ldexp(3.0, 2) - 12.0).abs(); /// @@ -588,7 +590,8 @@ impl f64 { /// * `0.5 <= abs(x) < 1.0` /// /// ``` - /// # #![feature(float_extras)] + /// #![feature(float_extras)] + /// /// let x = 4.0_f64; /// /// // (1/2)*2^3 -> 1 * 8/2 -> 4.0 @@ -614,7 +617,7 @@ impl f64 { /// `other`. /// /// ``` - /// # #![feature(float_extras)] + /// #![feature(float_extras)] /// /// let x = 1.0f32; /// |
