From 6a5a60048d98e0d0c545703ff5a9ba39beef49a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 10 Dec 2020 11:47:15 +0100 Subject: [PATCH] Indicate the anonymous lifetime of the GroupBy and GroupByMut --- library/core/src/slice/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 9d51a4779cff..218cd2c25a29 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -1233,7 +1233,7 @@ impl [T] { /// ``` #[unstable(feature = "slice_group_by", issue = "none")] #[inline] - pub fn group_by(&self, pred: F) -> GroupBy + pub fn group_by(&self, pred: F) -> GroupBy<'_, T, F> where F: FnMut(&T, &T) -> bool { GroupBy::new(self, pred) @@ -1262,7 +1262,7 @@ impl [T] { /// ``` #[unstable(feature = "slice_group_by", issue = "none")] #[inline] - pub fn group_by_mut(&mut self, pred: F) -> GroupByMut + pub fn group_by_mut(&mut self, pred: F) -> GroupByMut<'_, T, F> where F: FnMut(&T, &T) -> bool { GroupByMut::new(self, pred)