about summary refs log tree commit diff
path: root/src/liballoc/vec.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-03-21 04:34:04 +0000
committerbors <bors@rust-lang.org>2020-03-21 04:34:04 +0000
commit5f13820478907b09d50baf74f3ff2b78499ecd6c (patch)
treef8a09a299d9c7e09f562913e7aadefd3c4f12f0e /src/liballoc/vec.rs
parent1057dc97afce39ff6a224966ece3ed438af4c1f5 (diff)
parent54285db640453d2beec91423cb8cc792f52797f2 (diff)
downloadrust-5f13820478907b09d50baf74f3ff2b78499ecd6c.tar.gz
rust-5f13820478907b09d50baf74f3ff2b78499ecd6c.zip
Auto merge of #70205 - Centril:rollup-0jq9k4s, r=Centril
Rollup of 16 pull requests

Successful merges:

 - #65097 (Make std::sync::Arc compatible with ThreadSanitizer)
 - #69033 (Use generator resume arguments in the async/await lowering)
 - #69997 (add `Option::{zip,zip_with}` methods under "option_zip" gate)
 - #70038 (Remove the call that makes miri fail)
 - #70058 (can_begin_literal_maybe_minus: `true` on `"-"? lit` NTs.)
 - #70111 (BTreeMap: remove shared root)
 - #70139 (add delay_span_bug to TransmuteSizeDiff, just to be sure)
 - #70165 (Remove the erase regions MIR transform)
 - #70166 (Derive PartialEq, Eq and Hash for RangeInclusive)
 - #70176 (Add tests for #58319 and #65131)
 - #70177 (Fix oudated comment for NamedRegionMap)
 - #70184 (expand_include: set `.directory` to dir of included file.)
 - #70187 (more clippy fixes)
 - #70188 (Clean up E0439 explanation)
 - #70189 (Abi::is_signed: assert that we are a Scalar)
 - #70194 (#[must_use] on split_off())

Failed merges:

r? @ghost
Diffstat (limited to 'src/liballoc/vec.rs')
-rw-r--r--src/liballoc/vec.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs
index d1956270f13..4769091183a 100644
--- a/src/liballoc/vec.rs
+++ b/src/liballoc/vec.rs
@@ -1377,6 +1377,7 @@ impl<T> Vec<T> {
     /// assert_eq!(vec2, [2, 3]);
     /// ```
     #[inline]
+    #[must_use = "use `.truncate()` if you don't need the other half"]
     #[stable(feature = "split_off", since = "1.4.0")]
     pub fn split_off(&mut self, at: usize) -> Self {
         assert!(at <= self.len(), "`at` out of bounds");