diff options
| author | bors <bors@rust-lang.org> | 2020-01-16 07:20:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-01-16 07:20:52 +0000 |
| commit | 9fe05e9456b84996637c2f29b35c37960e537540 (patch) | |
| tree | 63b90b70dd13343e901b28e5f857ac404d8b32fa /src/libstd | |
| parent | e02c475da5c7d942cac2e3cf9683ea4117d4fe46 (diff) | |
| parent | 90b9a627bf191ac0726ce96e02d44a42ff445bf2 (diff) | |
| download | rust-9fe05e9456b84996637c2f29b35c37960e537540.tar.gz rust-9fe05e9456b84996637c2f29b35c37960e537540.zip | |
Auto merge of #68272 - Dylan-DPC:rollup-vrb90gu, r=Dylan-DPC
Rollup of 5 pull requests
Successful merges:
- #67780 (Move some queries from rustc::ty to librustc_ty.)
- #68096 (Clean up some diagnostics by making them more consistent)
- #68223 (Use 3.6 instead of 3.5 in float fract() documentation)
- #68265 (Fix some issue numbers of unstable features)
- #68266 (Changed docs for f32 and f64.)
Failed merges:
- #68204 (Use named fields for `{ast,hir}::ItemKind::Impl`)
r? @ghost
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/f32.rs | 12 | ||||
| -rw-r--r-- | src/libstd/f64.rs | 12 | ||||
| -rw-r--r-- | src/libstd/panicking.rs | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/src/libstd/f32.rs b/src/libstd/f32.rs index 267d7013b1e..c57bce95073 100644 --- a/src/libstd/f32.rs +++ b/src/libstd/f32.rs @@ -131,10 +131,10 @@ impl f32 { /// ``` /// use std::f32; /// - /// let x = 3.5_f32; - /// let y = -3.5_f32; - /// let abs_difference_x = (x.fract() - 0.5).abs(); - /// let abs_difference_y = (y.fract() - (-0.5)).abs(); + /// let x = 3.6_f32; + /// let y = -3.6_f32; + /// let abs_difference_x = (x.fract() - 0.6).abs(); + /// let abs_difference_y = (y.fract() - (-0.6)).abs(); /// /// assert!(abs_difference_x <= f32::EPSILON); /// assert!(abs_difference_y <= f32::EPSILON); @@ -355,7 +355,7 @@ impl f32 { return unsafe { intrinsics::powf32(self, n) }; } - /// Takes the square root of a number. + /// Returns the square root of a number. /// /// Returns NaN if `self` is a negative number. /// @@ -564,7 +564,7 @@ impl f32 { unsafe { cmath::fdimf(self, other) } } - /// Takes the cubic root of a number. + /// Returns the cubic root of a number. /// /// # Examples /// diff --git a/src/libstd/f64.rs b/src/libstd/f64.rs index 61ce7b29e26..d89b38e1a00 100644 --- a/src/libstd/f64.rs +++ b/src/libstd/f64.rs @@ -109,10 +109,10 @@ impl f64 { /// # Examples /// /// ``` - /// let x = 3.5_f64; - /// let y = -3.5_f64; - /// let abs_difference_x = (x.fract() - 0.5).abs(); - /// let abs_difference_y = (y.fract() - (-0.5)).abs(); + /// let x = 3.6_f64; + /// let y = -3.6_f64; + /// let abs_difference_x = (x.fract() - 0.6).abs(); + /// let abs_difference_y = (y.fract() - (-0.6)).abs(); /// /// assert!(abs_difference_x < 1e-10); /// assert!(abs_difference_y < 1e-10); @@ -323,7 +323,7 @@ impl f64 { unsafe { intrinsics::powf64(self, n) } } - /// Takes the square root of a number. + /// Returns the square root of a number. /// /// Returns NaN if `self` is a negative number. /// @@ -506,7 +506,7 @@ impl f64 { unsafe { cmath::fdim(self, other) } } - /// Takes the cubic root of a number. + /// Returns the cubic root of a number. /// /// # Examples /// diff --git a/src/libstd/panicking.rs b/src/libstd/panicking.rs index bfadeafb7c7..fee7ace92ea 100644 --- a/src/libstd/panicking.rs +++ b/src/libstd/panicking.rs @@ -208,7 +208,7 @@ fn default_hook(info: &PanicInfo<'_>) { let _ = writeln!( err, "note: run with `RUST_BACKTRACE=1` \ - environment variable to display a backtrace." + environment variable to display a backtrace" ); } } |
