aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/syntax_highlighting.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/syntax_highlighting.rs')
-rw-r--r--crates/ra_ide_api/src/syntax_highlighting.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_ide_api/src/syntax_highlighting.rs b/crates/ra_ide_api/src/syntax_highlighting.rs
index 3a04a51cd..7c4285b02 100644
--- a/crates/ra_ide_api/src/syntax_highlighting.rs
+++ b/crates/ra_ide_api/src/syntax_highlighting.rs
@@ -1,12 +1,12 @@
1use rustc_hash::{FxHashSet, FxHashMap}; 1use rustc_hash::{FxHashMap, FxHashSet};
2 2
3use ra_syntax::{
4 ast, AstNode, TextRange, Direction, SmolStr, SyntaxKind, SyntaxKind::*, SyntaxElement, T,
5};
6use ra_db::SourceDatabase; 3use ra_db::SourceDatabase;
7use ra_prof::profile; 4use ra_prof::profile;
5use ra_syntax::{
6 ast, AstNode, Direction, SmolStr, SyntaxElement, SyntaxKind, SyntaxKind::*, TextRange, T,
7};
8 8
9use crate::{FileId, db::RootDatabase}; 9use crate::{db::RootDatabase, FileId};
10 10
11#[derive(Debug)] 11#[derive(Debug)]
12pub struct HighlightedRange { 12pub struct HighlightedRange {
@@ -64,7 +64,7 @@ pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec<HighlightedRa
64 if let Some(name_ref) = node.as_node().and_then(ast::NameRef::cast) { 64 if let Some(name_ref) = node.as_node().and_then(ast::NameRef::cast) {
65 // FIXME: revisit this after #1340 65 // FIXME: revisit this after #1340
66 use crate::name_ref_kind::{classify_name_ref, NameRefKind::*}; 66 use crate::name_ref_kind::{classify_name_ref, NameRefKind::*};
67 use hir::{ModuleDef, ImplItem}; 67 use hir::{ImplItem, ModuleDef};
68 68
69 // FIXME: try to reuse the SourceAnalyzers 69 // FIXME: try to reuse the SourceAnalyzers
70 let analyzer = hir::SourceAnalyzer::new(db, file_id, name_ref.syntax(), None); 70 let analyzer = hir::SourceAnalyzer::new(db, file_id, name_ref.syntax(), None);
@@ -264,8 +264,8 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padding: 0.4e
264 264
265#[cfg(test)] 265#[cfg(test)]
266mod tests { 266mod tests {
267 use test_utils::{project_dir, read_text, assert_eq_text};
268 use crate::mock_analysis::single_file; 267 use crate::mock_analysis::single_file;
268 use test_utils::{assert_eq_text, project_dir, read_text};
269 269
270 #[test] 270 #[test]
271 fn test_highlighting() { 271 fn test_highlighting() {