diff options
| author | bors <bors@rust-lang.org> | 2022-11-07 02:15:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-11-07 02:15:39 +0000 |
| commit | 9b735a7132acd58b3bd34c084e9ca5b4ca7450a2 (patch) | |
| tree | a551182bfce55b37e2ba49f98be4796bf1e94093 /library/std/src | |
| parent | 7eef946fc0e0eff40e588eab77b09b287accbec3 (diff) | |
| parent | 7ca833efe07a918f3ba89630da312d3fd6a85e01 (diff) | |
| download | rust-9b735a7132acd58b3bd34c084e9ca5b4ca7450a2.tar.gz rust-9b735a7132acd58b3bd34c084e9ca5b4ca7450a2.zip | |
Auto merge of #104083 - JohnTitor:rollup-lo3wbzs, r=JohnTitor
Rollup of 9 pull requests Successful merges: - #103885 (rustdoc: various cross-crate reexport fixes) - #103914 (Make underscore_literal_suffix a hard error.) - #104045 (Add type_array to BaseTypeMethods) - #104056 (Vec: IntoIterator signature consistency) - #104059 (Fix typo in `rustc_middle/lint.rs`) - #104062 (rustdoc: remove unused CSS `#sidebar-filler`) - #104065 (Migrate rust logo filter to CSS variables) - #104066 (LLVM 16: Update RISCV data layout) - #104074 (rustdoc: Add an example for round that is different from truncate) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/f32.rs | 2 | ||||
| -rw-r--r-- | library/std/src/f64.rs | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/library/std/src/f32.rs b/library/std/src/f32.rs index dafcd876744..4127c4056f2 100644 --- a/library/std/src/f32.rs +++ b/library/std/src/f32.rs @@ -77,9 +77,11 @@ impl f32 { /// ``` /// let f = 3.3_f32; /// let g = -3.3_f32; + /// let h = -3.7_f32; /// /// assert_eq!(f.round(), 3.0); /// assert_eq!(g.round(), -3.0); + /// assert_eq!(h.round(), -4.0); /// ``` #[rustc_allow_incoherent_impl] #[must_use = "method returns a new number and does not mutate the original value"] diff --git a/library/std/src/f64.rs b/library/std/src/f64.rs index 77048f9a28f..cc64258da60 100644 --- a/library/std/src/f64.rs +++ b/library/std/src/f64.rs @@ -77,9 +77,11 @@ impl f64 { /// ``` /// let f = 3.3_f64; /// let g = -3.3_f64; + /// let h = -3.7_f64; /// /// assert_eq!(f.round(), 3.0); /// assert_eq!(g.round(), -3.0); + /// assert_eq!(h.round(), -4.0); /// ``` #[rustc_allow_incoherent_impl] #[must_use = "method returns a new number and does not mutate the original value"] |
