diff options
| author | Kornel <kornel@geekhood.net> | 2020-03-20 14:40:35 +0000 |
|---|---|---|
| committer | Kornel <kornel@geekhood.net> | 2020-03-20 14:40:35 +0000 |
| commit | 2f7d7c03334924d8d7b3630545cef62038ff0526 (patch) | |
| tree | 09785e2a15c794b86a2551149fe9ef67ad52051d /src/liballoc | |
| parent | f4c675c476c18b1a11041193f2f59d695b126bc8 (diff) | |
| download | rust-2f7d7c03334924d8d7b3630545cef62038ff0526.tar.gz rust-2f7d7c03334924d8d7b3630545cef62038ff0526.zip | |
must_use on split_off
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/vec.rs | 1 |
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"); |
