@@ -668,7 +668,7 @@ impl SyntaxNode {
668668 }
669669
670670 #[ inline]
671- pub fn ancestors ( & self ) -> impl Iterator < Item = SyntaxNode > {
671+ pub fn ancestors ( & self ) -> impl Iterator < Item = SyntaxNode > + use < > {
672672 iter:: successors ( Some ( self . clone ( ) ) , SyntaxNode :: parent)
673673 }
674674
@@ -831,7 +831,7 @@ impl SyntaxNode {
831831 }
832832
833833 #[ inline]
834- pub fn siblings ( & self , direction : Direction ) -> impl Iterator < Item = SyntaxNode > {
834+ pub fn siblings ( & self , direction : Direction ) -> impl Iterator < Item = SyntaxNode > + use < > {
835835 iter:: successors ( Some ( self . clone ( ) ) , move |node| match direction {
836836 Direction :: Next => node. next_sibling ( ) ,
837837 Direction :: Prev => node. prev_sibling ( ) ,
@@ -842,7 +842,7 @@ impl SyntaxNode {
842842 pub fn siblings_with_tokens (
843843 & self ,
844844 direction : Direction ,
845- ) -> impl Iterator < Item = SyntaxElement > {
845+ ) -> impl Iterator < Item = SyntaxElement > + use < > {
846846 let me: SyntaxElement = self . clone ( ) . into ( ) ;
847847 iter:: successors ( Some ( me) , move |el| match direction {
848848 Direction :: Next => el. next_sibling_or_token ( ) ,
@@ -851,15 +851,15 @@ impl SyntaxNode {
851851 }
852852
853853 #[ inline]
854- pub fn descendants ( & self ) -> impl Iterator < Item = SyntaxNode > {
854+ pub fn descendants ( & self ) -> impl Iterator < Item = SyntaxNode > + use < > {
855855 self . preorder ( ) . filter_map ( |event| match event {
856856 WalkEvent :: Enter ( node) => Some ( node) ,
857857 WalkEvent :: Leave ( _) => None ,
858858 } )
859859 }
860860
861861 #[ inline]
862- pub fn descendants_with_tokens ( & self ) -> impl Iterator < Item = SyntaxElement > {
862+ pub fn descendants_with_tokens ( & self ) -> impl Iterator < Item = SyntaxElement > + use < > {
863863 self . preorder_with_tokens ( ) . filter_map ( |event| match event {
864864 WalkEvent :: Enter ( it) => Some ( it) ,
865865 WalkEvent :: Leave ( _) => None ,
@@ -1054,7 +1054,7 @@ impl SyntaxToken {
10541054 }
10551055
10561056 #[ inline]
1057- pub fn ancestors ( & self ) -> impl Iterator < Item = SyntaxNode > {
1057+ pub fn ancestors ( & self ) -> impl Iterator < Item = SyntaxNode > + use < > {
10581058 std:: iter:: successors ( self . parent ( ) , SyntaxNode :: parent)
10591059 }
10601060
@@ -1077,7 +1077,7 @@ impl SyntaxToken {
10771077 pub fn siblings_with_tokens (
10781078 & self ,
10791079 direction : Direction ,
1080- ) -> impl Iterator < Item = SyntaxElement > {
1080+ ) -> impl Iterator < Item = SyntaxElement > + use < > {
10811081 let me: SyntaxElement = self . clone ( ) . into ( ) ;
10821082 iter:: successors ( Some ( me) , move |el| match direction {
10831083 Direction :: Next => el. next_sibling_or_token ( ) ,
@@ -1156,7 +1156,7 @@ impl SyntaxElement {
11561156 }
11571157
11581158 #[ inline]
1159- pub fn ancestors ( & self ) -> impl Iterator < Item = SyntaxNode > {
1159+ pub fn ancestors ( & self ) -> impl Iterator < Item = SyntaxNode > + use < > {
11601160 let first = match self {
11611161 NodeOrToken :: Node ( it) => Some ( it. clone ( ) ) ,
11621162 NodeOrToken :: Token ( it) => it. parent ( ) ,
0 commit comments