From 56760abf3b0202a74fcfb1b62bc53cfbddd8259c Mon Sep 17 00:00:00 2001 From: est31 Date: Tue, 24 Jan 2017 21:28:12 +0100 Subject: [PATCH] Add examples heading --- src/libstd/f32.rs | 4 ++++ src/libstd/f64.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/libstd/f32.rs b/src/libstd/f32.rs index ec0547662cc..5ec01e2e215 100644 --- a/src/libstd/f32.rs +++ b/src/libstd/f32.rs @@ -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; diff --git a/src/libstd/f64.rs b/src/libstd/f64.rs index 456ea9c1411..96d38f67ee2 100644 --- a/src/libstd/f64.rs +++ b/src/libstd/f64.rs @@ -1126,6 +1126,8 @@ fn log_wrapper 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; -- 2.44.0