about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-06-19 08:34:50 +0000
committerbors <bors@rust-lang.org>2020-06-19 08:34:50 +0000
commit63b441aafbf52d6ba789ecc478455800c1a48df9 (patch)
tree522aba5368c067b64995b45a91f3e4e5587bfe3a /src/liballoc
parenta39c7787ba246353178e099373b9240be0d9e603 (diff)
parent028c908991125742c4acc38b7a3108a1d1133771 (diff)
downloadrust-63b441aafbf52d6ba789ecc478455800c1a48df9.tar.gz
rust-63b441aafbf52d6ba789ecc478455800c1a48df9.zip
Auto merge of #73498 - RalfJung:rollup-1mfjcju, r=RalfJung
Rollup of 13 pull requests

Successful merges:

 - #70740 (Enabling static-pie for musl)
 - #72331 (Report error when casting an C-like enum implementing Drop)
 - #72486 (Fix asinh of negative values)
 - #72497 (tag/niche terminology cleanup)
 - #72999 (Create self-contained directory and move there some of external binaries/libs)
 - #73130 (Remove const prop for indirects)
 - #73142 (Ensure std benchmarks get tested.)
 - #73305 (Disallow loading crates with non-ascii identifier name.)
 - #73346 (Add rust specific features to print target features)
 - #73362 (Test that bounds checks are elided when slice len is checked up-front)
 - #73459 (Reduce pointer casts in Box::into_boxed_slice)
 - #73464 (Document format correction)
 - #73479 (Minor tweaks to liballoc)

Failed merges:

r? @ghost
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/Cargo.toml1
-rw-r--r--src/liballoc/boxed.rs2
-rw-r--r--src/liballoc/vec.rs6
3 files changed, 5 insertions, 4 deletions
diff --git a/src/liballoc/Cargo.toml b/src/liballoc/Cargo.toml
index d1119f7b7c0..914195f015b 100644
--- a/src/liballoc/Cargo.toml
+++ b/src/liballoc/Cargo.toml
@@ -25,6 +25,7 @@ path = "../liballoc/tests/lib.rs"
 [[bench]]
 name = "collectionsbenches"
 path = "../liballoc/benches/lib.rs"
+test = true
 
 [[bench]]
 name = "vec_deque_append_bench"
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index 22c344323a2..ab0dde0ada6 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -248,7 +248,7 @@ impl<T> Box<T> {
     #[unstable(feature = "box_into_boxed_slice", issue = "71582")]
     pub fn into_boxed_slice(boxed: Box<T>) -> Box<[T]> {
         // *mut T and *mut [T; 1] have the same size and alignment
-        unsafe { Box::from_raw(Box::into_raw(boxed) as *mut [T; 1] as *mut [T]) }
+        unsafe { Box::from_raw(Box::into_raw(boxed) as *mut [T; 1]) }
     }
 }
 
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs
index 06462fd96d9..f16cac05ea0 100644
--- a/src/liballoc/vec.rs
+++ b/src/liballoc/vec.rs
@@ -1639,7 +1639,7 @@ impl<T: Default> Vec<T> {
     }
 }
 
-// This code generalises `extend_with_{element,default}`.
+// This code generalizes `extend_with_{element,default}`.
 trait ExtendWith<T> {
     fn next(&mut self) -> T;
     fn last(self) -> T;
@@ -1837,7 +1837,7 @@ unsafe trait IsZero {
 }
 
 macro_rules! impl_is_zero {
-    ($t: ty, $is_zero: expr) => {
+    ($t:ty, $is_zero:expr) => {
         unsafe impl IsZero for $t {
             #[inline]
             fn is_zero(&self) -> bool {
@@ -2362,9 +2362,9 @@ macro_rules! __impl_slice_eq1 {
 __impl_slice_eq1! { [] Vec<A>, Vec<B>, }
 __impl_slice_eq1! { [] Vec<A>, &[B], }
 __impl_slice_eq1! { [] Vec<A>, &mut [B], }
+__impl_slice_eq1! { [] Cow<'_, [A]>, Vec<B>, A: Clone }
 __impl_slice_eq1! { [] Cow<'_, [A]>, &[B], A: Clone }
 __impl_slice_eq1! { [] Cow<'_, [A]>, &mut [B], A: Clone }
-__impl_slice_eq1! { [] Cow<'_, [A]>, Vec<B>, A: Clone }
 __impl_slice_eq1! { [const N: usize] Vec<A>, [B; N], [B; N]: LengthAtMost32 }
 __impl_slice_eq1! { [const N: usize] Vec<A>, &[B; N], [B; N]: LengthAtMost32 }