diff options
author | Aleksey Kladov <[email protected]> | 2019-07-04 21:05:17 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-07-04 21:09:09 +0100 |
commit | 1834bae5b86c54ed9dece26e82436919d59e6cb7 (patch) | |
tree | 92c8b984e874b67fa1831613464bbe356c1af3dd /crates/ra_ide_api/src/syntax_highlighting.rs | |
parent | 2b2cd829b0f95aef338227deb05ec7503dae9b6c (diff) |
allow rustfmt to reorder imports
This wasn't a right decision in the first place, the feature flag was
broken in the last rustfmt release, and syntax highlighting of imports
is more important anyway
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() { |