diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-05-04 16:15:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-04 16:15:41 +0200 |
| commit | fc2837b05abc7cb854f225fe91bb1be53cdc097e (patch) | |
| tree | 6aef0599c8ee2d54b4ade65463b4c035e3c5df5d /src | |
| parent | 3f38b99a63efbd60afbe036289ddbed366d906bc (diff) | |
| parent | a028292de58fefb507e20cdeb36f313526ee3bfb (diff) | |
| download | rust-fc2837b05abc7cb854f225fe91bb1be53cdc097e.tar.gz rust-fc2837b05abc7cb854f225fe91bb1be53cdc097e.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/num/f64.rs | 4 |
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); /// ``` |
