diff options
Diffstat (limited to 'crates/ra_ide_api/src/folding_ranges.rs')
-rw-r--r-- | crates/ra_ide_api/src/folding_ranges.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_ide_api/src/folding_ranges.rs b/crates/ra_ide_api/src/folding_ranges.rs index a6fe8a5d5..eada0b7de 100644 --- a/crates/ra_ide_api/src/folding_ranges.rs +++ b/crates/ra_ide_api/src/folding_ranges.rs | |||
@@ -1,9 +1,9 @@ | |||
1 | use rustc_hash::FxHashSet; | 1 | use rustc_hash::FxHashSet; |
2 | 2 | ||
3 | use ra_syntax::{ | 3 | use ra_syntax::{ |
4 | AstNode, SourceFile, SyntaxNode, TextRange, Direction, SyntaxElement, | 4 | SourceFile, SyntaxNode, TextRange, Direction, SyntaxElement, |
5 | SyntaxKind::{self, *}, | 5 | SyntaxKind::{self, *}, |
6 | ast::{self, VisibilityOwner, Comment}, | 6 | ast::{self, AstNode, AstToken, VisibilityOwner}, |
7 | }; | 7 | }; |
8 | 8 | ||
9 | #[derive(Debug, PartialEq, Eq)] | 9 | #[derive(Debug, PartialEq, Eq)] |
@@ -139,8 +139,8 @@ fn contiguous_range_for_group_unless<'a>( | |||
139 | } | 139 | } |
140 | 140 | ||
141 | fn contiguous_range_for_comment<'a>( | 141 | fn contiguous_range_for_comment<'a>( |
142 | first: Comment<'a>, | 142 | first: ast::Comment<'a>, |
143 | visited: &mut FxHashSet<Comment<'a>>, | 143 | visited: &mut FxHashSet<ast::Comment<'a>>, |
144 | ) -> Option<TextRange> { | 144 | ) -> Option<TextRange> { |
145 | visited.insert(first); | 145 | visited.insert(first); |
146 | 146 | ||
@@ -157,7 +157,7 @@ fn contiguous_range_for_comment<'a>( | |||
157 | continue; | 157 | continue; |
158 | } | 158 | } |
159 | } | 159 | } |
160 | if let Some(c) = Comment::cast(token) { | 160 | if let Some(c) = ast::Comment::cast(token) { |
161 | if c.flavor() == group_flavor { | 161 | if c.flavor() == group_flavor { |
162 | visited.insert(c); | 162 | visited.insert(c); |
163 | last = c; | 163 | last = c; |