diff options
| author | bors <bors@rust-lang.org> | 2020-04-15 00:39:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-04-15 00:39:22 +0000 |
| commit | 76cbf0053f8812e210603689b4173c210976fe6c (patch) | |
| tree | 3b94ae78b3728cbbc259eefa63c69160c1f24ea6 /src/liballoc | |
| parent | d12f0304839e599d498b3faaa652336b273bdcc8 (diff) | |
| parent | db3addb30b3b7b8b12e04ad04d9e3f362db13438 (diff) | |
Auto merge of #71151 - Dylan-DPC:rollup-6rt4h7b, r=Dylan-DPC
Rollup of 8 pull requests Successful merges: - #70657 (Allow `try`-blocks in places where an open delim is expected) - #70947 (tighten CTFE safety net for accesses to globals) - #70949 (simplify `vec!` macro) - #71002 (fix target & runtool args order) - #71082 (ptr: introduce len() method on raw slices) - #71128 (Remove unused single_step flag) - #71133 (Tighten time complexity on the doc of sort_by_key) - #71135 (Update books) Failed merges: r? @ghost
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/macros.rs | 5 | ||||
| -rw-r--r-- | src/liballoc/slice.rs | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/liballoc/macros.rs b/src/liballoc/macros.rs index 4bc0c3a079d..e163a166b49 100644 --- a/src/liballoc/macros.rs +++ b/src/liballoc/macros.rs @@ -42,10 +42,9 @@ macro_rules! vec { ($elem:expr; $n:expr) => ( $crate::vec::from_elem($elem, $n) ); - ($($x:expr),*) => ( - <[_]>::into_vec(box [$($x),*]) + ($($x:expr),+ $(,)?) => ( + <[_]>::into_vec(box [$($x),+]) ); - ($($x:expr,)*) => ($crate::vec![$($x),*]) } // HACK(japaric): with cfg(test) the inherent `[T]::into_vec` method, which is diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index 4ae7532d992..4171185c970 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -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(m 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 |
