diff --git a/crates/editor/src/display_map/crease_map.rs b/crates/editor/src/display_map/crease_map.rs index bfc9c7d1a4..c3f2b0061a 100644 --- a/crates/editor/src/display_map/crease_map.rs +++ b/crates/editor/src/display_map/crease_map.rs @@ -69,7 +69,7 @@ impl CreaseSnapshot { &'a self, range: Range, snapshot: &'a MultiBufferSnapshot, - ) -> impl '_ + Iterator { + ) -> impl 'a + Iterator { let start = snapshot.anchor_before(Point::new(range.start.0, 0)); let mut cursor = self.creases.cursor::(snapshot); cursor.seek(&start, Bias::Left, snapshot); diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index b54889dc0d..ad5cd24d73 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -11515,7 +11515,7 @@ impl Editor { &'a self, position: Anchor, buffer: &'a MultiBufferSnapshot, - ) -> impl 'a + Iterator> { + ) -> impl 'a + Iterator> { let read_highlights = self .background_highlights .get(&TypeId::of::()) diff --git a/crates/language/src/syntax_map.rs b/crates/language/src/syntax_map.rs index daae54fb4d..55177f7962 100644 --- a/crates/language/src/syntax_map.rs +++ b/crates/language/src/syntax_map.rs @@ -794,7 +794,7 @@ impl SyntaxSnapshot { range: Range, buffer: &'a BufferSnapshot, query: fn(&Grammar) -> Option<&Query>, - ) -> SyntaxMapCaptures { + ) -> SyntaxMapCaptures<'a> { SyntaxMapCaptures::new( range.clone(), buffer.as_rope(), @@ -808,7 +808,7 @@ impl SyntaxSnapshot { range: Range, buffer: &'a BufferSnapshot, query: fn(&Grammar) -> Option<&Query>, - ) -> SyntaxMapMatches { + ) -> SyntaxMapMatches<'a> { SyntaxMapMatches::new( range.clone(), buffer.as_rope(), @@ -828,7 +828,7 @@ impl SyntaxSnapshot { range: Range, buffer: &'a BufferSnapshot, include_hidden: bool, - ) -> impl 'a + Iterator { + ) -> impl 'a + Iterator> { let start_offset = range.start.to_offset(buffer); let end_offset = range.end.to_offset(buffer); let start = buffer.anchor_before(start_offset); diff --git a/crates/project/src/project.rs b/crates/project/src/project.rs index 5a9b235d91..ee7f93a4f9 100644 --- a/crates/project/src/project.rs +++ b/crates/project/src/project.rs @@ -3954,7 +3954,7 @@ impl Project { pub fn supplementary_language_servers<'a>( &'a self, cx: &'a AppContext, - ) -> impl '_ + Iterator { + ) -> impl 'a + Iterator { self.lsp_store.read(cx).supplementary_language_servers() } diff --git a/crates/sum_tree/src/sum_tree.rs b/crates/sum_tree/src/sum_tree.rs index 965413d319..7013dc66fd 100644 --- a/crates/sum_tree/src/sum_tree.rs +++ b/crates/sum_tree/src/sum_tree.rs @@ -345,7 +345,7 @@ impl SumTree { Iter::new(self) } - pub fn cursor<'a, S>(&'a self, cx: &::Context) -> Cursor + pub fn cursor<'a, S>(&'a self, cx: &::Context) -> Cursor<'a, T, S> where S: Dimension<'a, T::Summary>, { @@ -358,7 +358,7 @@ impl SumTree { &'a self, cx: &::Context, filter_node: F, - ) -> FilterCursor + ) -> FilterCursor<'a, F, T, U> where F: FnMut(&T::Summary) -> bool, U: Dimension<'a, T::Summary>, diff --git a/crates/sum_tree/src/tree_map.rs b/crates/sum_tree/src/tree_map.rs index b7eadb566d..c57226b681 100644 --- a/crates/sum_tree/src/tree_map.rs +++ b/crates/sum_tree/src/tree_map.rs @@ -105,7 +105,7 @@ impl TreeMap { cursor.item().map(|item| (&item.key, &item.value)) } - pub fn iter_from<'a>(&'a self, from: &'a K) -> impl Iterator + '_ { + pub fn iter_from<'a>(&'a self, from: &'a K) -> impl Iterator + 'a { let mut cursor = self.0.cursor::>(&()); let from_key = MapKeyRef(Some(from)); cursor.seek(&from_key, Bias::Left, &()); diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index c7ba4ae3fa..4d65629470 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -2119,7 +2119,7 @@ impl Workspace { pub fn items<'a>( &'a self, cx: &'a AppContext, - ) -> impl 'a + Iterator> { + ) -> impl 'a + Iterator> { self.panes.iter().flat_map(|pane| pane.read(cx).items()) }