]> git.lizzy.rs Git - rust.git/commitdiff
Add examples heading
authorest31 <MTest31@outlook.com>
Tue, 24 Jan 2017 20:28:12 +0000 (21:28 +0100)
committerest31 <MTest31@outlook.com>
Tue, 18 Apr 2017 00:43:16 +0000 (02:43 +0200)
src/libstd/f32.rs
src/libstd/f64.rs

index ec0547662ccca070db7b3095e261a05ef2a36f94..5ec01e2e215cc93df7322f1f180c0fbc9174d1d1 100644 (file)
@@ -1234,6 +1234,8 @@ pub fn atanh(self) -> f32 {
     ///
     /// Note that this function is distinct from casting.
     ///
+    /// # Examples
+    ///
     /// ```
     /// #![feature(float_bits_conv)]
     /// assert!((1f32).to_bits() != 1f32 as u32); // to_bits() is not casting!
@@ -1257,6 +1259,8 @@ pub fn to_bits(self) -> u32 {
     /// Returns `Err(())` if the representation of a signaling NaN "sNaN"
     /// float, is passed to the function.
     ///
+    /// # Examples
+    ///
     /// ```
     /// #![feature(float_bits_conv)]
     /// use std::f32;
index 456ea9c14112dd47d0e9025d79c12c493fbec90a..96d38f67ee2146849a7477887a01b620a063af6f 100644 (file)
@@ -1126,6 +1126,8 @@ fn log_wrapper<F: Fn(f64) -> f64>(self, log_fn: F) -> f64 {
     ///
     /// Note that this function is distinct from casting.
     ///
+    /// # Examples
+    ///
     /// ```
     /// #![feature(float_bits_conv)]
     /// assert!((1f64).to_bits() != 1f64 as u64); // to_bits() is not casting!
@@ -1149,6 +1151,8 @@ pub fn to_bits(self) -> u64 {
     /// Returns `Err(())` if the representation of a signaling NaN "sNaN"
     /// float, is passed to the function.
     ///
+    /// # Examples
+    ///
     /// ```
     /// #![feature(float_bits_conv)]
     /// use std::f64;