From fb2d0f5c03d2f699eb87bc1986386bdcf6a3f6eb Mon Sep 17 00:00:00 2001 From: John Kugelman Date: Thu, 14 Oct 2021 19:56:53 -0400 Subject: Add #[must_use] to remaining alloc functions --- library/alloc/src/vec/drain.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'library/alloc/src/vec') diff --git a/library/alloc/src/vec/drain.rs b/library/alloc/src/vec/drain.rs index e643940d017..ff98091a0d2 100644 --- a/library/alloc/src/vec/drain.rs +++ b/library/alloc/src/vec/drain.rs @@ -60,6 +60,7 @@ impl<'a, T, A: Allocator> Drain<'a, T, A> { /// Returns a reference to the underlying allocator. #[unstable(feature = "allocator_api", issue = "32838")] + #[must_use] #[inline] pub fn allocator(&self) -> &A { unsafe { self.vec.as_ref().allocator() } -- cgit 1.4.1-3-g733a5