about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-07-09 21:32:02 +0000
committerbors <bors@rust-lang.org>2020-07-09 21:32:02 +0000
commite59b08e62ea691916d2f063cac5aab4634128022 (patch)
tree7bafe998869c457ebaa9f82179f49c37baf7a551 /src/liballoc
parent5db778affee7c6600c8e7a177c48282dab3f6292 (diff)
parent9353e21bfdea148e910b2530270a3418db836bf3 (diff)
downloadrust-e59b08e62ea691916d2f063cac5aab4634128022.tar.gz
rust-e59b08e62ea691916d2f063cac5aab4634128022.zip
Auto merge of #74195 - Manishearth:rollup-h3m0sl8, r=Manishearth
Rollup of 14 pull requests

Successful merges:

 - #73292 (Fixing broken link for the Eq trait)
 - #73791 (Allow for parentheses after macro intra-doc-links)
 - #74070 ( Use for<'tcx> fn pointers in Providers, instead of having Providers<'tcx>.)
 - #74077 (Use relative path for local links to primitives)
 - #74079 (Eliminate confusing "globals" terminology.)
 - #74107 (Hide `&mut self` methods from Deref in sidebar if there are no `DerefMut` impl for the type.)
 - #74136 (Fix broken link in rustdocdoc)
 - #74137 (Update cargo)
 - #74142 (Liballoc use vec instead of vector)
 - #74143 (Try remove unneeded ToString import in liballoc slice)
 - #74146 (update miri)
 - #74150 (Avoid "blacklist")
 - #74184 (Add docs for intra-doc-links)
 - #74188 (Tweak `::` -> `:` typo heuristic and reduce verbosity)

Failed merges:

 - #74122 (Start-up clean-up)
 - #74127 (Avoid "whitelist")

r? @ghost
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/slice.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs
index d7dc2174d66..3d51115fe01 100644
--- a/src/liballoc/slice.rs
+++ b/src/liballoc/slice.rs
@@ -136,8 +136,6 @@ pub use hack::to_vec;
 // `test_permutations` test
 mod hack {
     use crate::boxed::Box;
-    #[cfg(test)]
-    use crate::string::ToString;
     use crate::vec::Vec;
 
     // We shouldn't add inline attribute to this since this is used in
@@ -156,9 +154,9 @@ mod hack {
     where
         T: Clone,
     {
-        let mut vector = Vec::with_capacity(s.len());
-        vector.extend_from_slice(s);
-        vector
+        let mut vec = Vec::with_capacity(s.len());
+        vec.extend_from_slice(s);
+        vec
     }
 }