diff options
| author | bors <bors@rust-lang.org> | 2020-04-17 21:57:06 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-04-17 21:57:06 +0000 |
| commit | cff9a758ae116a0b54a55033f6a5156f8656cc0c (patch) | |
| tree | d763343c30cab7190d2280146cc464515c13cca3 /src/liballoc/slice.rs | |
| parent | ce93331e2cf21ac4b72a53854b105955919114e7 (diff) | |
| parent | 4b9eeca5c55f4064731a963674fa4056a9a50ce5 (diff) | |
| download | rust-cff9a758ae116a0b54a55033f6a5156f8656cc0c.tar.gz rust-cff9a758ae116a0b54a55033f6a5156f8656cc0c.zip | |
Auto merge of #71264 - Dylan-DPC:rollup-njgbey7, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - #70467 (Use `call` instead of `invoke` for functions that cannot unwind ) - #71070 (rustbuild: Remove stage 0 LLD flavor workaround for MSVC) - #71167 (big-O notation: parenthesis for function calls, explicit multiplication) - #71238 (Miri: fix typo) - #71242 (Format Mailmap To Work With GitHub) - #71243 (Account for use of `try!()` in 2018 edition and guide users in the right direction) Failed merges: r? @ghost
Diffstat (limited to 'src/liballoc/slice.rs')
| -rw-r--r-- | src/liballoc/slice.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index 4171185c970..955cbe77819 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -165,7 +165,7 @@ mod hack { impl<T> [T] { /// Sorts the slice. /// - /// This sort is stable (i.e., does not reorder equal elements) and `O(n log n)` worst-case. + /// This sort is stable (i.e., does not reorder equal elements) and `O(n * log(n))` worst-case. /// /// When applicable, unstable sorting is preferred because it is generally faster than stable /// sorting and it doesn't allocate auxiliary memory. @@ -200,7 +200,7 @@ impl<T> [T] { /// Sorts the slice with a comparator function. /// - /// This sort is stable (i.e., does not reorder equal elements) and `O(n log n)` worst-case. + /// This sort is stable (i.e., does not reorder equal elements) and `O(n * log(n))` worst-case. /// /// The comparator function must define a total ordering for the elements in the slice. If /// the ordering is not total, the order of the elements is unspecified. An order is a @@ -254,7 +254,7 @@ impl<T> [T] { /// Sorts the slice with a key extraction function. /// - /// This sort is stable (i.e., does not reorder equal elements) and `O(m n log n)` + /// This sort is stable (i.e., does not reorder equal elements) and `O(m * n * log(n))` /// worst-case, where the key function is `O(m)`. /// /// For expensive key functions (e.g. functions that are not simple property accesses or @@ -297,7 +297,7 @@ impl<T> [T] { /// /// During sorting, the key function is called only once per element. /// - /// This sort is stable (i.e., does not reorder equal elements) and `O(m n + n log n)` + /// This sort is stable (i.e., does not reorder equal elements) and `O(m * n + n * log(n))` /// worst-case, where the key function is `O(m)`. /// /// For simple key functions (e.g., functions that are property accesses or @@ -935,7 +935,7 @@ where /// 1. for every `i` in `1..runs.len()`: `runs[i - 1].len > runs[i].len` /// 2. for every `i` in `2..runs.len()`: `runs[i - 2].len > runs[i - 1].len + runs[i].len` /// -/// The invariants ensure that the total running time is `O(n log n)` worst-case. +/// The invariants ensure that the total running time is `O(n * log(n))` worst-case. fn merge_sort<T, F>(v: &mut [T], mut is_less: F) where F: FnMut(&T, &T) -> bool, |
