We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4c675c commit 2f7d7c0Copy full SHA for 2f7d7c0
src/liballoc/vec.rs
@@ -1377,6 +1377,7 @@ impl<T> Vec<T> {
1377
/// assert_eq!(vec2, [2, 3]);
1378
/// ```
1379
#[inline]
1380
+ #[must_use = "use `.truncate()` if you don't need the other half"]
1381
#[stable(feature = "split_off", since = "1.4.0")]
1382
pub fn split_off(&mut self, at: usize) -> Self {
1383
assert!(at <= self.len(), "`at` out of bounds");
0 commit comments