diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-04 21:09:32 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-04 21:09:32 +0100 |
commit | cacdb0eab8131bfb945eb7ed0150c92ec56eefe2 (patch) | |
tree | f762de90ce813591bc640ae0bce36493a3dcafa9 /crates/ra_ide_api/src/syntax_highlighting.rs | |
parent | 4e8664d9d37021e85d72b6228fa45e7edf4a1a74 (diff) | |
parent | 1834bae5b86c54ed9dece26e82436919d59e6cb7 (diff) |
Merge #1486
1486: allow rustfmt to reorder imports r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/syntax_highlighting.rs')
-rw-r--r-- | crates/ra_ide_api/src/syntax_highlighting.rs | 14 |
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 @@ | |||
1 | use rustc_hash::{FxHashSet, FxHashMap}; | 1 | use rustc_hash::{FxHashMap, FxHashSet}; |
2 | 2 | ||
3 | use ra_syntax::{ | ||
4 | ast, AstNode, TextRange, Direction, SmolStr, SyntaxKind, SyntaxKind::*, SyntaxElement, T, | ||
5 | }; | ||
6 | use ra_db::SourceDatabase; | 3 | use ra_db::SourceDatabase; |
7 | use ra_prof::profile; | 4 | use ra_prof::profile; |
5 | use ra_syntax::{ | ||
6 | ast, AstNode, Direction, SmolStr, SyntaxElement, SyntaxKind, SyntaxKind::*, TextRange, T, | ||
7 | }; | ||
8 | 8 | ||
9 | use crate::{FileId, db::RootDatabase}; | 9 | use crate::{db::RootDatabase, FileId}; |
10 | 10 | ||
11 | #[derive(Debug)] | 11 | #[derive(Debug)] |
12 | pub struct HighlightedRange { | 12 | pub 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)] |
266 | mod tests { | 266 | mod 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() { |