about summary refs log tree commit diff
path: root/src/libcore/num
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2020-05-04 08:28:53 -0500
committerSteve Klabnik <steve@steveklabnik.com>2020-05-04 08:28:53 -0500
commita028292de58fefb507e20cdeb36f313526ee3bfb (patch)
tree2854a9ea438db247d57df1c9f257e369ef604b37 /src/libcore/num
parentd626e4dadc37d7027d65f087da0ad1ddb460959f (diff)
downloadrust-a028292de58fefb507e20cdeb36f313526ee3bfb.tar.gz
rust-a028292de58fefb507e20cdeb36f313526ee3bfb.zip
Use f64 in f64 examples
I believe that this is a copy/paste error; this example was using f32,
but it's the docs for f64.
Diffstat (limited to 'src/libcore/num')
-rw-r--r--src/libcore/num/f64.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/num/f64.rs b/src/libcore/num/f64.rs
index b38fd804ee8..73e760a2ee8 100644
--- a/src/libcore/num/f64.rs
+++ b/src/libcore/num/f64.rs
@@ -474,11 +474,11 @@ impl f64 {
     /// assuming that the value is finite and fits in that type.
     ///
     /// ```
-    /// let value = 4.6_f32;
+    /// let value = 4.6_f64;
     /// let rounded = unsafe { value.to_int_unchecked::<u16>() };
     /// assert_eq!(rounded, 4);
     ///
-    /// let value = -128.9_f32;
+    /// let value = -128.9_f64;
     /// let rounded = unsafe { value.to_int_unchecked::<i8>() };
     /// assert_eq!(rounded, i8::MIN);
     /// ```