Skip to content

Commit fc2837b

Browse files
authored
Rollup merge of #71877 - steveklabnik:small-example-fix, r=Mark-Simulacrum
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.
2 parents 3f38b99 + a028292 commit fc2837b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/num/f64.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -474,11 +474,11 @@ impl f64 {
474474
/// assuming that the value is finite and fits in that type.
475475
///
476476
/// ```
477-
/// let value = 4.6_f32;
477+
/// let value = 4.6_f64;
478478
/// let rounded = unsafe { value.to_int_unchecked::<u16>() };
479479
/// assert_eq!(rounded, 4);
480480
///
481-
/// let value = -128.9_f32;
481+
/// let value = -128.9_f64;
482482
/// let rounded = unsafe { value.to_int_unchecked::<i8>() };
483483
/// assert_eq!(rounded, i8::MIN);
484484
/// ```

0 commit comments

Comments
 (0)