diff --git a/library/core/src/slice/iter.rs b/library/core/src/slice/iter.rs index 9053376bdf24..71106c66f125 100644 --- a/library/core/src/slice/iter.rs +++ b/library/core/src/slice/iter.rs @@ -3020,7 +3020,7 @@ where P: FnMut(&T, &T) -> bool, } #[inline] - fn last(self) -> Option { + fn last(mut self) -> Option { self.next_back() } } @@ -3105,7 +3105,7 @@ where P: FnMut(&T, &T) -> bool, } #[inline] - fn last(self) -> Option { + fn last(mut self) -> Option { self.next_back() } }