From ae282d8da63a82077361bc142b2b9a272a2eac64 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 2 Apr 2019 10:23:18 +0300 Subject: add ast::tokens --- crates/ra_ide_api/src/folding_ranges.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/ra_ide_api/src/folding_ranges.rs') 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 @@ use rustc_hash::FxHashSet; use ra_syntax::{ - AstNode, SourceFile, SyntaxNode, TextRange, Direction, SyntaxElement, + SourceFile, SyntaxNode, TextRange, Direction, SyntaxElement, SyntaxKind::{self, *}, - ast::{self, VisibilityOwner, Comment}, + ast::{self, AstNode, AstToken, VisibilityOwner}, }; #[derive(Debug, PartialEq, Eq)] @@ -139,8 +139,8 @@ fn contiguous_range_for_group_unless<'a>( } fn contiguous_range_for_comment<'a>( - first: Comment<'a>, - visited: &mut FxHashSet>, + first: ast::Comment<'a>, + visited: &mut FxHashSet>, ) -> Option { visited.insert(first); @@ -157,7 +157,7 @@ fn contiguous_range_for_comment<'a>( continue; } } - if let Some(c) = Comment::cast(token) { + if let Some(c) = ast::Comment::cast(token) { if c.flavor() == group_flavor { visited.insert(c); last = c; -- cgit v1.2.3