diff --git a/compiler/rustc_data_structures/src/vec_map.rs b/compiler/rustc_data_structures/src/vec_map.rs index 81d7fe3f6bd..ceafdbbce26 100644 --- a/compiler/rustc_data_structures/src/vec_map.rs +++ b/compiler/rustc_data_structures/src/vec_map.rs @@ -33,10 +33,7 @@ where self.0.iter().find(|(key, _)| k == key.borrow()).map(|elem| &elem.1) } - pub fn get_by

(&self, mut predicate: P) -> Option<&V> - where - for<'b> P: FnMut(&'b &(K, V)) -> bool, - { + pub fn get_by(&self, mut predicate: impl FnMut(&(K, V)) -> bool) -> Option<&V> { self.0.iter().find(|kv| predicate(kv)).map(|elem| &elem.1) }