Add examples heading

This commit is contained in:
est31 2017-01-24 21:28:12 +01:00
parent 82eead0d0b
commit 56760abf3b
2 changed files with 8 additions and 0 deletions

View file

@ -1234,6 +1234,8 @@ impl 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 @@ impl f32 {
/// Returns `Err(())` if the representation of a signaling NaN "sNaN"
/// float, is passed to the function.
///
/// # Examples
///
/// ```
/// #![feature(float_bits_conv)]
/// use std::f32;

View file

@ -1126,6 +1126,8 @@ impl 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 @@ impl f64 {
/// Returns `Err(())` if the representation of a signaling NaN "sNaN"
/// float, is passed to the function.
///
/// # Examples
///
/// ```
/// #![feature(float_bits_conv)]
/// use std::f64;