Skip to content

Commit

Permalink
Add examples heading
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 committed Apr 18, 2017
1 parent 82eead0 commit 56760ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libstd/f32.rs
Expand Up @@ -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!
Expand All @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions src/libstd/f64.rs
Expand Up @@ -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!
Expand All @@ -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;
Expand Down

0 comments on commit 56760ab

Please sign in to comment.