diff options
Diffstat (limited to 'crates/libsyntax2/src/algo')
-rw-r--r-- | crates/libsyntax2/src/algo/visit.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/libsyntax2/src/algo/visit.rs b/crates/libsyntax2/src/algo/visit.rs index dc5afa5a9..55eb72f59 100644 --- a/crates/libsyntax2/src/algo/visit.rs +++ b/crates/libsyntax2/src/algo/visit.rs | |||
@@ -1,5 +1,5 @@ | |||
1 | use std::marker::PhantomData; | 1 | use std::marker::PhantomData; |
2 | use {SyntaxNodeRef, AstNode, SyntaxRoot}; | 2 | use {SyntaxNodeRef, AstNode, RefRoot}; |
3 | 3 | ||
4 | 4 | ||
5 | pub fn visitor<'a, T>() -> impl Visitor<'a, Output=T> { | 5 | pub fn visitor<'a, T>() -> impl Visitor<'a, Output=T> { |
@@ -10,7 +10,7 @@ pub trait Visitor<'a>: Sized { | |||
10 | type Output; | 10 | type Output; |
11 | fn accept(self, node: SyntaxNodeRef<'a>) -> Option<Self::Output>; | 11 | fn accept(self, node: SyntaxNodeRef<'a>) -> Option<Self::Output>; |
12 | fn visit<N, F>(self, f: F) -> Vis<Self, N, F> | 12 | fn visit<N, F>(self, f: F) -> Vis<Self, N, F> |
13 | where N: AstNode<&'a SyntaxRoot>, | 13 | where N: AstNode<RefRoot<'a>>, |
14 | F: FnOnce(N) -> Self::Output, | 14 | F: FnOnce(N) -> Self::Output, |
15 | { | 15 | { |
16 | Vis { inner: self, f, ph: PhantomData } | 16 | Vis { inner: self, f, ph: PhantomData } |
@@ -40,7 +40,7 @@ pub struct Vis<V, N, F> { | |||
40 | impl<'a, V, N, F> Visitor<'a> for Vis<V, N, F> | 40 | impl<'a, V, N, F> Visitor<'a> for Vis<V, N, F> |
41 | where | 41 | where |
42 | V: Visitor<'a>, | 42 | V: Visitor<'a>, |
43 | N: AstNode<&'a SyntaxRoot>, | 43 | N: AstNode<RefRoot<'a>>, |
44 | F: FnOnce(N) -> <V as Visitor<'a>>::Output, | 44 | F: FnOnce(N) -> <V as Visitor<'a>>::Output, |
45 | { | 45 | { |
46 | type Output = <V as Visitor<'a>>::Output; | 46 | type Output = <V as Visitor<'a>>::Output; |