diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-08-12 17:31:42 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-12 17:31:42 +0100 |
commit | d583f2c46d22cf8d643ebf98be9cb7059a304431 (patch) | |
tree | 9d898eb9600b0c36a74e4f95238f679c683fa566 /crates/ra_ide | |
parent | 3d6889cba72a9d02199f7adaa2ecc69bc30af834 (diff) | |
parent | a1c187eef3ba08076aedb5154929f7eda8d1b424 (diff) |
Merge #5729
5729: Rename ra_syntax -> syntax
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide')
44 files changed, 59 insertions, 59 deletions
diff --git a/crates/ra_ide/Cargo.toml b/crates/ra_ide/Cargo.toml index 84c25f0b8..8e0fa5917 100644 --- a/crates/ra_ide/Cargo.toml +++ b/crates/ra_ide/Cargo.toml | |||
@@ -21,7 +21,7 @@ oorandom = "11.1.2" | |||
21 | 21 | ||
22 | stdx = { path = "../stdx" } | 22 | stdx = { path = "../stdx" } |
23 | 23 | ||
24 | ra_syntax = { path = "../ra_syntax" } | 24 | syntax = { path = "../syntax" } |
25 | text_edit = { path = "../text_edit" } | 25 | text_edit = { path = "../text_edit" } |
26 | ra_db = { path = "../ra_db" } | 26 | ra_db = { path = "../ra_db" } |
27 | ra_ide_db = { path = "../ra_ide_db" } | 27 | ra_ide_db = { path = "../ra_ide_db" } |
diff --git a/crates/ra_ide/src/call_hierarchy.rs b/crates/ra_ide/src/call_hierarchy.rs index 1fcaf4a32..116e6bf83 100644 --- a/crates/ra_ide/src/call_hierarchy.rs +++ b/crates/ra_ide/src/call_hierarchy.rs | |||
@@ -4,7 +4,7 @@ use indexmap::IndexMap; | |||
4 | 4 | ||
5 | use hir::Semantics; | 5 | use hir::Semantics; |
6 | use ra_ide_db::RootDatabase; | 6 | use ra_ide_db::RootDatabase; |
7 | use ra_syntax::{ast, match_ast, AstNode, TextRange}; | 7 | use syntax::{ast, match_ast, AstNode, TextRange}; |
8 | 8 | ||
9 | use crate::{ | 9 | use crate::{ |
10 | call_info::FnCallNode, display::ToNav, goto_definition, references, FilePosition, | 10 | call_info::FnCallNode, display::ToNav, goto_definition, references, FilePosition, |
diff --git a/crates/ra_ide/src/call_info.rs b/crates/ra_ide/src/call_info.rs index ff602202f..703cbc6b4 100644 --- a/crates/ra_ide/src/call_info.rs +++ b/crates/ra_ide/src/call_info.rs | |||
@@ -2,11 +2,11 @@ | |||
2 | use either::Either; | 2 | use either::Either; |
3 | use hir::{Docs, HirDisplay, Semantics, Type}; | 3 | use hir::{Docs, HirDisplay, Semantics, Type}; |
4 | use ra_ide_db::RootDatabase; | 4 | use ra_ide_db::RootDatabase; |
5 | use ra_syntax::{ | 5 | use stdx::format_to; |
6 | use syntax::{ | ||
6 | ast::{self, ArgListOwner}, | 7 | ast::{self, ArgListOwner}, |
7 | match_ast, AstNode, SyntaxNode, SyntaxToken, TextRange, TextSize, | 8 | match_ast, AstNode, SyntaxNode, SyntaxToken, TextRange, TextSize, |
8 | }; | 9 | }; |
9 | use stdx::format_to; | ||
10 | use test_utils::mark; | 10 | use test_utils::mark; |
11 | 11 | ||
12 | use crate::FilePosition; | 12 | use crate::FilePosition; |
diff --git a/crates/ra_ide/src/completion/complete_attribute.rs b/crates/ra_ide/src/completion/complete_attribute.rs index 2faaae974..603d935de 100644 --- a/crates/ra_ide/src/completion/complete_attribute.rs +++ b/crates/ra_ide/src/completion/complete_attribute.rs | |||
@@ -3,8 +3,8 @@ | |||
3 | //! This module uses a bit of static metadata to provide completions | 3 | //! This module uses a bit of static metadata to provide completions |
4 | //! for built-in attributes. | 4 | //! for built-in attributes. |
5 | 5 | ||
6 | use ra_syntax::{ast, AstNode, SyntaxKind}; | ||
7 | use rustc_hash::FxHashSet; | 6 | use rustc_hash::FxHashSet; |
7 | use syntax::{ast, AstNode, SyntaxKind}; | ||
8 | 8 | ||
9 | use crate::completion::{ | 9 | use crate::completion::{ |
10 | completion_context::CompletionContext, | 10 | completion_context::CompletionContext, |
diff --git a/crates/ra_ide/src/completion/complete_fn_param.rs b/crates/ra_ide/src/completion/complete_fn_param.rs index 406334257..7c63ce58f 100644 --- a/crates/ra_ide/src/completion/complete_fn_param.rs +++ b/crates/ra_ide/src/completion/complete_fn_param.rs | |||
@@ -1,10 +1,10 @@ | |||
1 | //! See `complete_fn_param`. | 1 | //! See `complete_fn_param`. |
2 | 2 | ||
3 | use ra_syntax::{ | 3 | use rustc_hash::FxHashMap; |
4 | use syntax::{ | ||
4 | ast::{self, ModuleItemOwner}, | 5 | ast::{self, ModuleItemOwner}, |
5 | match_ast, AstNode, | 6 | match_ast, AstNode, |
6 | }; | 7 | }; |
7 | use rustc_hash::FxHashMap; | ||
8 | 8 | ||
9 | use crate::completion::{CompletionContext, CompletionItem, CompletionKind, Completions}; | 9 | use crate::completion::{CompletionContext, CompletionItem, CompletionKind, Completions}; |
10 | 10 | ||
diff --git a/crates/ra_ide/src/completion/complete_keyword.rs b/crates/ra_ide/src/completion/complete_keyword.rs index b62064797..a80708935 100644 --- a/crates/ra_ide/src/completion/complete_keyword.rs +++ b/crates/ra_ide/src/completion/complete_keyword.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | 2 | ||
3 | use ra_syntax::{ast, SyntaxKind}; | 3 | use syntax::{ast, SyntaxKind}; |
4 | use test_utils::mark; | 4 | use test_utils::mark; |
5 | 5 | ||
6 | use crate::completion::{ | 6 | use crate::completion::{ |
diff --git a/crates/ra_ide/src/completion/complete_postfix.rs b/crates/ra_ide/src/completion/complete_postfix.rs index 42087da8d..05e15d464 100644 --- a/crates/ra_ide/src/completion/complete_postfix.rs +++ b/crates/ra_ide/src/completion/complete_postfix.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | use ra_assists::utils::TryEnum; | 2 | use ra_assists::utils::TryEnum; |
3 | use ra_syntax::{ | 3 | use syntax::{ |
4 | ast::{self, AstNode}, | 4 | ast::{self, AstNode}, |
5 | TextRange, TextSize, | 5 | TextRange, TextSize, |
6 | }; | 6 | }; |
diff --git a/crates/ra_ide/src/completion/complete_qualified_path.rs b/crates/ra_ide/src/completion/complete_qualified_path.rs index b08f5b9b4..cb7dd23c1 100644 --- a/crates/ra_ide/src/completion/complete_qualified_path.rs +++ b/crates/ra_ide/src/completion/complete_qualified_path.rs | |||
@@ -1,8 +1,8 @@ | |||
1 | //! Completion of paths, i.e. `some::prefix::<|>`. | 1 | //! Completion of paths, i.e. `some::prefix::<|>`. |
2 | 2 | ||
3 | use hir::{Adt, HasVisibility, PathResolution, ScopeDef}; | 3 | use hir::{Adt, HasVisibility, PathResolution, ScopeDef}; |
4 | use ra_syntax::AstNode; | ||
5 | use rustc_hash::FxHashSet; | 4 | use rustc_hash::FxHashSet; |
5 | use syntax::AstNode; | ||
6 | use test_utils::mark; | 6 | use test_utils::mark; |
7 | 7 | ||
8 | use crate::completion::{CompletionContext, Completions}; | 8 | use crate::completion::{CompletionContext, Completions}; |
diff --git a/crates/ra_ide/src/completion/complete_trait_impl.rs b/crates/ra_ide/src/completion/complete_trait_impl.rs index b397baf10..d7edd92cf 100644 --- a/crates/ra_ide/src/completion/complete_trait_impl.rs +++ b/crates/ra_ide/src/completion/complete_trait_impl.rs | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | use hir::{self, Docs, HasSource}; | 34 | use hir::{self, Docs, HasSource}; |
35 | use ra_assists::utils::get_missing_assoc_items; | 35 | use ra_assists::utils::get_missing_assoc_items; |
36 | use ra_syntax::{ | 36 | use syntax::{ |
37 | ast::{self, edit, Impl}, | 37 | ast::{self, edit, Impl}, |
38 | AstNode, SyntaxKind, SyntaxNode, TextRange, T, | 38 | AstNode, SyntaxKind, SyntaxNode, TextRange, T, |
39 | }; | 39 | }; |
diff --git a/crates/ra_ide/src/completion/complete_unqualified_path.rs b/crates/ra_ide/src/completion/complete_unqualified_path.rs index bd9551f35..824227f31 100644 --- a/crates/ra_ide/src/completion/complete_unqualified_path.rs +++ b/crates/ra_ide/src/completion/complete_unqualified_path.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | //! Completion of names from the current scope, e.g. locals and imported items. | 1 | //! Completion of names from the current scope, e.g. locals and imported items. |
2 | 2 | ||
3 | use hir::{Adt, ModuleDef, ScopeDef, Type}; | 3 | use hir::{Adt, ModuleDef, ScopeDef, Type}; |
4 | use ra_syntax::AstNode; | 4 | use syntax::AstNode; |
5 | use test_utils::mark; | 5 | use test_utils::mark; |
6 | 6 | ||
7 | use crate::completion::{CompletionContext, Completions}; | 7 | use crate::completion::{CompletionContext, Completions}; |
diff --git a/crates/ra_ide/src/completion/completion_context.rs b/crates/ra_ide/src/completion/completion_context.rs index 0cb57fb1b..b5efb6cd6 100644 --- a/crates/ra_ide/src/completion/completion_context.rs +++ b/crates/ra_ide/src/completion/completion_context.rs | |||
@@ -3,7 +3,7 @@ | |||
3 | use hir::{Semantics, SemanticsScope, Type}; | 3 | use hir::{Semantics, SemanticsScope, Type}; |
4 | use ra_db::SourceDatabase; | 4 | use ra_db::SourceDatabase; |
5 | use ra_ide_db::RootDatabase; | 5 | use ra_ide_db::RootDatabase; |
6 | use ra_syntax::{ | 6 | use syntax::{ |
7 | algo::{find_covering_element, find_node_at_offset}, | 7 | algo::{find_covering_element, find_node_at_offset}, |
8 | ast, match_ast, AstNode, NodeOrToken, | 8 | ast, match_ast, AstNode, NodeOrToken, |
9 | SyntaxKind::*, | 9 | SyntaxKind::*, |
diff --git a/crates/ra_ide/src/completion/completion_item.rs b/crates/ra_ide/src/completion/completion_item.rs index 1c0684f4e..9377cdc57 100644 --- a/crates/ra_ide/src/completion/completion_item.rs +++ b/crates/ra_ide/src/completion/completion_item.rs | |||
@@ -3,7 +3,7 @@ | |||
3 | use std::fmt; | 3 | use std::fmt; |
4 | 4 | ||
5 | use hir::Documentation; | 5 | use hir::Documentation; |
6 | use ra_syntax::TextRange; | 6 | use syntax::TextRange; |
7 | use text_edit::TextEdit; | 7 | use text_edit::TextEdit; |
8 | 8 | ||
9 | use crate::completion::completion_config::SnippetCap; | 9 | use crate::completion::completion_config::SnippetCap; |
diff --git a/crates/ra_ide/src/completion/patterns.rs b/crates/ra_ide/src/completion/patterns.rs index 7c4feff6d..ffc97c076 100644 --- a/crates/ra_ide/src/completion/patterns.rs +++ b/crates/ra_ide/src/completion/patterns.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! Patterns telling us certain facts about current syntax element, they are used in completion context | 1 | //! Patterns telling us certain facts about current syntax element, they are used in completion context |
2 | 2 | ||
3 | use ra_syntax::{ | 3 | use syntax::{ |
4 | algo::non_trivia_sibling, | 4 | algo::non_trivia_sibling, |
5 | ast::{self, LoopBodyOwner}, | 5 | ast::{self, LoopBodyOwner}, |
6 | match_ast, AstNode, Direction, NodeOrToken, SyntaxElement, | 6 | match_ast, AstNode, Direction, NodeOrToken, SyntaxElement, |
diff --git a/crates/ra_ide/src/completion/presentation.rs b/crates/ra_ide/src/completion/presentation.rs index 59f1b1424..e1b1ea4ce 100644 --- a/crates/ra_ide/src/completion/presentation.rs +++ b/crates/ra_ide/src/completion/presentation.rs | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | use hir::{Docs, HasAttrs, HasSource, HirDisplay, ModPath, ScopeDef, StructKind, Type}; | 4 | use hir::{Docs, HasAttrs, HasSource, HirDisplay, ModPath, ScopeDef, StructKind, Type}; |
5 | use itertools::Itertools; | 5 | use itertools::Itertools; |
6 | use ra_syntax::ast::NameOwner; | 6 | use syntax::ast::NameOwner; |
7 | use test_utils::mark; | 7 | use test_utils::mark; |
8 | 8 | ||
9 | use crate::{ | 9 | use crate::{ |
diff --git a/crates/ra_ide/src/completion/test_utils.rs b/crates/ra_ide/src/completion/test_utils.rs index 919177745..1452d7e9e 100644 --- a/crates/ra_ide/src/completion/test_utils.rs +++ b/crates/ra_ide/src/completion/test_utils.rs | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | use hir::Semantics; | 3 | use hir::Semantics; |
4 | use itertools::Itertools; | 4 | use itertools::Itertools; |
5 | use ra_syntax::{AstNode, NodeOrToken, SyntaxElement}; | ||
6 | use stdx::{format_to, trim_indent}; | 5 | use stdx::{format_to, trim_indent}; |
6 | use syntax::{AstNode, NodeOrToken, SyntaxElement}; | ||
7 | use test_utils::assert_eq_text; | 7 | use test_utils::assert_eq_text; |
8 | 8 | ||
9 | use crate::{ | 9 | use crate::{ |
diff --git a/crates/ra_ide/src/diagnostics.rs b/crates/ra_ide/src/diagnostics.rs index 54810d5bb..18def6115 100644 --- a/crates/ra_ide/src/diagnostics.rs +++ b/crates/ra_ide/src/diagnostics.rs | |||
@@ -10,7 +10,7 @@ use hir::{diagnostics::DiagnosticSinkBuilder, Semantics}; | |||
10 | use itertools::Itertools; | 10 | use itertools::Itertools; |
11 | use ra_db::SourceDatabase; | 11 | use ra_db::SourceDatabase; |
12 | use ra_ide_db::RootDatabase; | 12 | use ra_ide_db::RootDatabase; |
13 | use ra_syntax::{ | 13 | use syntax::{ |
14 | ast::{self, AstNode}, | 14 | ast::{self, AstNode}, |
15 | SyntaxNode, TextRange, T, | 15 | SyntaxNode, TextRange, T, |
16 | }; | 16 | }; |
diff --git a/crates/ra_ide/src/diagnostics/diagnostics_with_fix.rs b/crates/ra_ide/src/diagnostics/diagnostics_with_fix.rs index 8fb25de6c..efcd631b3 100644 --- a/crates/ra_ide/src/diagnostics/diagnostics_with_fix.rs +++ b/crates/ra_ide/src/diagnostics/diagnostics_with_fix.rs | |||
@@ -12,7 +12,7 @@ use ra_ide_db::{ | |||
12 | source_change::{FileSystemEdit, SourceFileEdit}, | 12 | source_change::{FileSystemEdit, SourceFileEdit}, |
13 | RootDatabase, | 13 | RootDatabase, |
14 | }; | 14 | }; |
15 | use ra_syntax::{algo, ast, AstNode}; | 15 | use syntax::{algo, ast, AstNode}; |
16 | use text_edit::TextEdit; | 16 | use text_edit::TextEdit; |
17 | 17 | ||
18 | /// A [Diagnostic] that potentially has a fix available. | 18 | /// A [Diagnostic] that potentially has a fix available. |
diff --git a/crates/ra_ide/src/display.rs b/crates/ra_ide/src/display.rs index fd42aa435..41b5bdc49 100644 --- a/crates/ra_ide/src/display.rs +++ b/crates/ra_ide/src/display.rs | |||
@@ -4,7 +4,7 @@ | |||
4 | mod navigation_target; | 4 | mod navigation_target; |
5 | mod short_label; | 5 | mod short_label; |
6 | 6 | ||
7 | use ra_syntax::{ | 7 | use syntax::{ |
8 | ast::{self, AstNode, AttrsOwner, GenericParamsOwner, NameOwner}, | 8 | ast::{self, AstNode, AttrsOwner, GenericParamsOwner, NameOwner}, |
9 | SyntaxKind::{ATTR, COMMENT}, | 9 | SyntaxKind::{ATTR, COMMENT}, |
10 | }; | 10 | }; |
diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs index fdbf75abd..683088a74 100644 --- a/crates/ra_ide/src/display/navigation_target.rs +++ b/crates/ra_ide/src/display/navigation_target.rs | |||
@@ -4,7 +4,7 @@ use either::Either; | |||
4 | use hir::{original_range, AssocItem, FieldSource, HasSource, InFile, ModuleSource}; | 4 | use hir::{original_range, AssocItem, FieldSource, HasSource, InFile, ModuleSource}; |
5 | use ra_db::{FileId, SourceDatabase}; | 5 | use ra_db::{FileId, SourceDatabase}; |
6 | use ra_ide_db::{defs::Definition, RootDatabase}; | 6 | use ra_ide_db::{defs::Definition, RootDatabase}; |
7 | use ra_syntax::{ | 7 | use syntax::{ |
8 | ast::{self, DocCommentsOwner, NameOwner}, | 8 | ast::{self, DocCommentsOwner, NameOwner}, |
9 | match_ast, AstNode, SmolStr, | 9 | match_ast, AstNode, SmolStr, |
10 | SyntaxKind::{self, IDENT_PAT, TYPE_PARAM}, | 10 | SyntaxKind::{self, IDENT_PAT, TYPE_PARAM}, |
diff --git a/crates/ra_ide/src/display/short_label.rs b/crates/ra_ide/src/display/short_label.rs index 010c34705..ea49d9f97 100644 --- a/crates/ra_ide/src/display/short_label.rs +++ b/crates/ra_ide/src/display/short_label.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | 2 | ||
3 | use ra_syntax::ast::{self, AstNode, NameOwner, VisibilityOwner}; | ||
4 | use stdx::format_to; | 3 | use stdx::format_to; |
4 | use syntax::ast::{self, AstNode, NameOwner, VisibilityOwner}; | ||
5 | 5 | ||
6 | pub(crate) trait ShortLabel { | 6 | pub(crate) trait ShortLabel { |
7 | fn short_label(&self) -> Option<String>; | 7 | fn short_label(&self) -> Option<String>; |
diff --git a/crates/ra_ide/src/expand_macro.rs b/crates/ra_ide/src/expand_macro.rs index 043515f54..c25e068d6 100644 --- a/crates/ra_ide/src/expand_macro.rs +++ b/crates/ra_ide/src/expand_macro.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use hir::Semantics; | 1 | use hir::Semantics; |
2 | use ra_ide_db::RootDatabase; | 2 | use ra_ide_db::RootDatabase; |
3 | use ra_syntax::{ | 3 | use syntax::{ |
4 | algo::{find_node_at_offset, SyntaxRewriter}, | 4 | algo::{find_node_at_offset, SyntaxRewriter}, |
5 | ast, AstNode, NodeOrToken, SyntaxKind, | 5 | ast, AstNode, NodeOrToken, SyntaxKind, |
6 | SyntaxKind::*, | 6 | SyntaxKind::*, |
diff --git a/crates/ra_ide/src/extend_selection.rs b/crates/ra_ide/src/extend_selection.rs index 7230a0ff9..f30df2bff 100644 --- a/crates/ra_ide/src/extend_selection.rs +++ b/crates/ra_ide/src/extend_selection.rs | |||
@@ -2,7 +2,7 @@ use std::iter::successors; | |||
2 | 2 | ||
3 | use hir::Semantics; | 3 | use hir::Semantics; |
4 | use ra_ide_db::RootDatabase; | 4 | use ra_ide_db::RootDatabase; |
5 | use ra_syntax::{ | 5 | use syntax::{ |
6 | algo::{self, find_covering_element, skip_trivia_token}, | 6 | algo::{self, find_covering_element, skip_trivia_token}, |
7 | ast::{self, AstNode, AstToken}, | 7 | ast::{self, AstNode, AstToken}, |
8 | Direction, NodeOrToken, | 8 | Direction, NodeOrToken, |
diff --git a/crates/ra_ide/src/file_structure.rs b/crates/ra_ide/src/file_structure.rs index 87cab4503..c90247ba6 100644 --- a/crates/ra_ide/src/file_structure.rs +++ b/crates/ra_ide/src/file_structure.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | use ra_syntax::{ | 1 | use syntax::{ |
2 | ast::{self, AttrsOwner, GenericParamsOwner, NameOwner}, | 2 | ast::{self, AttrsOwner, GenericParamsOwner, NameOwner}, |
3 | match_ast, AstNode, SourceFile, SyntaxKind, SyntaxNode, TextRange, WalkEvent, | 3 | match_ast, AstNode, SourceFile, SyntaxKind, SyntaxNode, TextRange, WalkEvent, |
4 | }; | 4 | }; |
diff --git a/crates/ra_ide/src/folding_ranges.rs b/crates/ra_ide/src/folding_ranges.rs index 0fbc9babd..7523aec55 100644 --- a/crates/ra_ide/src/folding_ranges.rs +++ b/crates/ra_ide/src/folding_ranges.rs | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | use rustc_hash::FxHashSet; | 3 | use rustc_hash::FxHashSet; |
4 | 4 | ||
5 | use ra_syntax::{ | 5 | use syntax::{ |
6 | ast::{self, AstNode, AstToken, VisibilityOwner}, | 6 | ast::{self, AstNode, AstToken, VisibilityOwner}, |
7 | Direction, NodeOrToken, SourceFile, | 7 | Direction, NodeOrToken, SourceFile, |
8 | SyntaxKind::{self, *}, | 8 | SyntaxKind::{self, *}, |
diff --git a/crates/ra_ide/src/goto_definition.rs b/crates/ra_ide/src/goto_definition.rs index 45389fd23..77f374ea2 100644 --- a/crates/ra_ide/src/goto_definition.rs +++ b/crates/ra_ide/src/goto_definition.rs | |||
@@ -3,7 +3,7 @@ use ra_ide_db::{ | |||
3 | defs::{classify_name, classify_name_ref}, | 3 | defs::{classify_name, classify_name_ref}, |
4 | symbol_index, RootDatabase, | 4 | symbol_index, RootDatabase, |
5 | }; | 5 | }; |
6 | use ra_syntax::{ | 6 | use syntax::{ |
7 | ast::{self}, | 7 | ast::{self}, |
8 | match_ast, AstNode, | 8 | match_ast, AstNode, |
9 | SyntaxKind::*, | 9 | SyntaxKind::*, |
@@ -101,7 +101,7 @@ pub(crate) fn reference_definition( | |||
101 | #[cfg(test)] | 101 | #[cfg(test)] |
102 | mod tests { | 102 | mod tests { |
103 | use ra_db::FileRange; | 103 | use ra_db::FileRange; |
104 | use ra_syntax::{TextRange, TextSize}; | 104 | use syntax::{TextRange, TextSize}; |
105 | 105 | ||
106 | use crate::mock_analysis::MockAnalysis; | 106 | use crate::mock_analysis::MockAnalysis; |
107 | 107 | ||
diff --git a/crates/ra_ide/src/goto_implementation.rs b/crates/ra_ide/src/goto_implementation.rs index 9912b7142..91a8c1dd1 100644 --- a/crates/ra_ide/src/goto_implementation.rs +++ b/crates/ra_ide/src/goto_implementation.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use hir::{Crate, ImplDef, Semantics}; | 1 | use hir::{Crate, ImplDef, Semantics}; |
2 | use ra_ide_db::RootDatabase; | 2 | use ra_ide_db::RootDatabase; |
3 | use ra_syntax::{algo::find_node_at_offset, ast, AstNode}; | 3 | use syntax::{algo::find_node_at_offset, ast, AstNode}; |
4 | 4 | ||
5 | use crate::{display::ToNav, FilePosition, NavigationTarget, RangeInfo}; | 5 | use crate::{display::ToNav, FilePosition, NavigationTarget, RangeInfo}; |
6 | 6 | ||
diff --git a/crates/ra_ide/src/goto_type_definition.rs b/crates/ra_ide/src/goto_type_definition.rs index 8f52feea6..3ec2ee59d 100644 --- a/crates/ra_ide/src/goto_type_definition.rs +++ b/crates/ra_ide/src/goto_type_definition.rs | |||
@@ -1,5 +1,5 @@ | |||
1 | use ra_ide_db::RootDatabase; | 1 | use ra_ide_db::RootDatabase; |
2 | use ra_syntax::{ast, match_ast, AstNode, SyntaxKind::*, SyntaxToken, TokenAtOffset, T}; | 2 | use syntax::{ast, match_ast, AstNode, SyntaxKind::*, SyntaxToken, TokenAtOffset, T}; |
3 | 3 | ||
4 | use crate::{display::ToNav, FilePosition, NavigationTarget, RangeInfo}; | 4 | use crate::{display::ToNav, FilePosition, NavigationTarget, RangeInfo}; |
5 | 5 | ||
diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs index f66f62bfb..37e68ff7a 100644 --- a/crates/ra_ide/src/hover.rs +++ b/crates/ra_ide/src/hover.rs | |||
@@ -8,8 +8,8 @@ use ra_ide_db::{ | |||
8 | defs::{classify_name, classify_name_ref, Definition}, | 8 | defs::{classify_name, classify_name_ref, Definition}, |
9 | RootDatabase, | 9 | RootDatabase, |
10 | }; | 10 | }; |
11 | use ra_syntax::{ast, match_ast, AstNode, SyntaxKind::*, SyntaxToken, TokenAtOffset, T}; | ||
12 | use stdx::format_to; | 11 | use stdx::format_to; |
12 | use syntax::{ast, match_ast, AstNode, SyntaxKind::*, SyntaxToken, TokenAtOffset, T}; | ||
13 | use test_utils::mark; | 13 | use test_utils::mark; |
14 | 14 | ||
15 | use crate::{ | 15 | use crate::{ |
diff --git a/crates/ra_ide/src/inlay_hints.rs b/crates/ra_ide/src/inlay_hints.rs index 920b04e8d..46ddc528e 100644 --- a/crates/ra_ide/src/inlay_hints.rs +++ b/crates/ra_ide/src/inlay_hints.rs | |||
@@ -1,10 +1,10 @@ | |||
1 | use hir::{Adt, Callable, HirDisplay, Semantics, Type}; | 1 | use hir::{Adt, Callable, HirDisplay, Semantics, Type}; |
2 | use ra_ide_db::RootDatabase; | 2 | use ra_ide_db::RootDatabase; |
3 | use ra_syntax::{ | 3 | use stdx::to_lower_snake_case; |
4 | use syntax::{ | ||
4 | ast::{self, ArgListOwner, AstNode}, | 5 | ast::{self, ArgListOwner, AstNode}, |
5 | match_ast, Direction, NodeOrToken, SmolStr, SyntaxKind, TextRange, T, | 6 | match_ast, Direction, NodeOrToken, SmolStr, SyntaxKind, TextRange, T, |
6 | }; | 7 | }; |
7 | use stdx::to_lower_snake_case; | ||
8 | 8 | ||
9 | use crate::FileId; | 9 | use crate::FileId; |
10 | use ast::NameOwner; | 10 | use ast::NameOwner; |
diff --git a/crates/ra_ide/src/join_lines.rs b/crates/ra_ide/src/join_lines.rs index caf63933a..35cec87f6 100644 --- a/crates/ra_ide/src/join_lines.rs +++ b/crates/ra_ide/src/join_lines.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use itertools::Itertools; | 1 | use itertools::Itertools; |
2 | use ra_fmt::{compute_ws, extract_trivial_expression}; | 2 | use ra_fmt::{compute_ws, extract_trivial_expression}; |
3 | use ra_syntax::{ | 3 | use syntax::{ |
4 | algo::{find_covering_element, non_trivia_sibling}, | 4 | algo::{find_covering_element, non_trivia_sibling}, |
5 | ast::{self, AstNode, AstToken}, | 5 | ast::{self, AstNode, AstToken}, |
6 | Direction, NodeOrToken, SourceFile, | 6 | Direction, NodeOrToken, SourceFile, |
@@ -170,7 +170,7 @@ fn is_trailing_comma(left: SyntaxKind, right: SyntaxKind) -> bool { | |||
170 | 170 | ||
171 | #[cfg(test)] | 171 | #[cfg(test)] |
172 | mod tests { | 172 | mod tests { |
173 | use ra_syntax::SourceFile; | 173 | use syntax::SourceFile; |
174 | use test_utils::{add_cursor, assert_eq_text, extract_offset, extract_range}; | 174 | use test_utils::{add_cursor, assert_eq_text, extract_offset, extract_range}; |
175 | 175 | ||
176 | use super::*; | 176 | use super::*; |
@@ -437,11 +437,11 @@ fn foo() { | |||
437 | // No space after the '{' | 437 | // No space after the '{' |
438 | check_join_lines( | 438 | check_join_lines( |
439 | r" | 439 | r" |
440 | <|>use ra_syntax::{ | 440 | <|>use syntax::{ |
441 | TextSize, TextRange, | 441 | TextSize, TextRange, |
442 | };", | 442 | };", |
443 | r" | 443 | r" |
444 | <|>use ra_syntax::{TextSize, TextRange, | 444 | <|>use syntax::{TextSize, TextRange, |
445 | };", | 445 | };", |
446 | ); | 446 | ); |
447 | } | 447 | } |
@@ -451,11 +451,11 @@ fn foo() { | |||
451 | // No space after the '}' | 451 | // No space after the '}' |
452 | check_join_lines( | 452 | check_join_lines( |
453 | r" | 453 | r" |
454 | use ra_syntax::{ | 454 | use syntax::{ |
455 | <|> TextSize, TextRange | 455 | <|> TextSize, TextRange |
456 | };", | 456 | };", |
457 | r" | 457 | r" |
458 | use ra_syntax::{ | 458 | use syntax::{ |
459 | <|> TextSize, TextRange};", | 459 | <|> TextSize, TextRange};", |
460 | ); | 460 | ); |
461 | } | 461 | } |
@@ -465,11 +465,11 @@ use ra_syntax::{ | |||
465 | // No space after the '}' | 465 | // No space after the '}' |
466 | check_join_lines( | 466 | check_join_lines( |
467 | r" | 467 | r" |
468 | use ra_syntax::{ | 468 | use syntax::{ |
469 | <|> TextSize, TextRange, | 469 | <|> TextSize, TextRange, |
470 | };", | 470 | };", |
471 | r" | 471 | r" |
472 | use ra_syntax::{ | 472 | use syntax::{ |
473 | <|> TextSize, TextRange};", | 473 | <|> TextSize, TextRange};", |
474 | ); | 474 | ); |
475 | } | 475 | } |
@@ -478,14 +478,14 @@ use ra_syntax::{ | |||
478 | fn test_join_lines_use_tree() { | 478 | fn test_join_lines_use_tree() { |
479 | check_join_lines( | 479 | check_join_lines( |
480 | r" | 480 | r" |
481 | use ra_syntax::{ | 481 | use syntax::{ |
482 | algo::<|>{ | 482 | algo::<|>{ |
483 | find_token_at_offset, | 483 | find_token_at_offset, |
484 | }, | 484 | }, |
485 | ast, | 485 | ast, |
486 | };", | 486 | };", |
487 | r" | 487 | r" |
488 | use ra_syntax::{ | 488 | use syntax::{ |
489 | algo::<|>find_token_at_offset, | 489 | algo::<|>find_token_at_offset, |
490 | ast, | 490 | ast, |
491 | };", | 491 | };", |
diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs index 09cb5faf6..20967ba99 100644 --- a/crates/ra_ide/src/lib.rs +++ b/crates/ra_ide/src/lib.rs | |||
@@ -56,7 +56,7 @@ use ra_ide_db::{ | |||
56 | symbol_index::{self, FileSymbol}, | 56 | symbol_index::{self, FileSymbol}, |
57 | LineIndexDatabase, | 57 | LineIndexDatabase, |
58 | }; | 58 | }; |
59 | use ra_syntax::{SourceFile, TextRange, TextSize}; | 59 | use syntax::{SourceFile, TextRange, TextSize}; |
60 | 60 | ||
61 | use crate::display::ToNav; | 61 | use crate::display::ToNav; |
62 | 62 | ||
diff --git a/crates/ra_ide/src/matching_brace.rs b/crates/ra_ide/src/matching_brace.rs index 742d70c9c..cb6abb0db 100644 --- a/crates/ra_ide/src/matching_brace.rs +++ b/crates/ra_ide/src/matching_brace.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | use ra_syntax::{ | 1 | use syntax::{ |
2 | ast::{self, AstNode}, | 2 | ast::{self, AstNode}, |
3 | SourceFile, SyntaxKind, TextSize, T, | 3 | SourceFile, SyntaxKind, TextSize, T, |
4 | }; | 4 | }; |
diff --git a/crates/ra_ide/src/parent_module.rs b/crates/ra_ide/src/parent_module.rs index e3e0c7639..69af0c86a 100644 --- a/crates/ra_ide/src/parent_module.rs +++ b/crates/ra_ide/src/parent_module.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | use hir::Semantics; | 1 | use hir::Semantics; |
2 | use ra_db::{CrateId, FileId, FilePosition}; | 2 | use ra_db::{CrateId, FileId, FilePosition}; |
3 | use ra_ide_db::RootDatabase; | 3 | use ra_ide_db::RootDatabase; |
4 | use ra_syntax::{ | 4 | use syntax::{ |
5 | algo::find_node_at_offset, | 5 | algo::find_node_at_offset, |
6 | ast::{self, AstNode}, | 6 | ast::{self, AstNode}, |
7 | }; | 7 | }; |
diff --git a/crates/ra_ide/src/references.rs b/crates/ra_ide/src/references.rs index c4eea3a45..e89dca869 100644 --- a/crates/ra_ide/src/references.rs +++ b/crates/ra_ide/src/references.rs | |||
@@ -17,7 +17,7 @@ use ra_ide_db::{ | |||
17 | search::SearchScope, | 17 | search::SearchScope, |
18 | RootDatabase, | 18 | RootDatabase, |
19 | }; | 19 | }; |
20 | use ra_syntax::{ | 20 | use syntax::{ |
21 | algo::find_node_at_offset, | 21 | algo::find_node_at_offset, |
22 | ast::{self, NameOwner}, | 22 | ast::{self, NameOwner}, |
23 | AstNode, SyntaxKind, SyntaxNode, TextRange, TokenAtOffset, | 23 | AstNode, SyntaxKind, SyntaxNode, TextRange, TokenAtOffset, |
diff --git a/crates/ra_ide/src/references/rename.rs b/crates/ra_ide/src/references/rename.rs index 9c688fb06..a075618e7 100644 --- a/crates/ra_ide/src/references/rename.rs +++ b/crates/ra_ide/src/references/rename.rs | |||
@@ -6,12 +6,12 @@ use ra_ide_db::{ | |||
6 | defs::{classify_name, classify_name_ref, Definition, NameClass, NameRefClass}, | 6 | defs::{classify_name, classify_name_ref, Definition, NameClass, NameRefClass}, |
7 | RootDatabase, | 7 | RootDatabase, |
8 | }; | 8 | }; |
9 | use ra_syntax::{ | 9 | use std::convert::TryInto; |
10 | use syntax::{ | ||
10 | algo::find_node_at_offset, | 11 | algo::find_node_at_offset, |
11 | ast::{self, NameOwner}, | 12 | ast::{self, NameOwner}, |
12 | lex_single_valid_syntax_kind, match_ast, AstNode, SyntaxKind, SyntaxNode, SyntaxToken, | 13 | lex_single_valid_syntax_kind, match_ast, AstNode, SyntaxKind, SyntaxNode, SyntaxToken, |
13 | }; | 14 | }; |
14 | use std::convert::TryInto; | ||
15 | use test_utils::mark; | 15 | use test_utils::mark; |
16 | use text_edit::TextEdit; | 16 | use text_edit::TextEdit; |
17 | 17 | ||
diff --git a/crates/ra_ide/src/runnables.rs b/crates/ra_ide/src/runnables.rs index 3b7162b84..54cb3b309 100644 --- a/crates/ra_ide/src/runnables.rs +++ b/crates/ra_ide/src/runnables.rs | |||
@@ -4,7 +4,7 @@ use hir::{AsAssocItem, Attrs, HirFileId, InFile, Semantics}; | |||
4 | use itertools::Itertools; | 4 | use itertools::Itertools; |
5 | use ra_cfg::CfgExpr; | 5 | use ra_cfg::CfgExpr; |
6 | use ra_ide_db::RootDatabase; | 6 | use ra_ide_db::RootDatabase; |
7 | use ra_syntax::{ | 7 | use syntax::{ |
8 | ast::{self, AstNode, AttrsOwner, DocCommentsOwner, ModuleItemOwner, NameOwner}, | 8 | ast::{self, AstNode, AttrsOwner, DocCommentsOwner, ModuleItemOwner, NameOwner}, |
9 | match_ast, SyntaxNode, | 9 | match_ast, SyntaxNode, |
10 | }; | 10 | }; |
diff --git a/crates/ra_ide/src/status.rs b/crates/ra_ide/src/status.rs index 009bb662f..797ead1ad 100644 --- a/crates/ra_ide/src/status.rs +++ b/crates/ra_ide/src/status.rs | |||
@@ -10,8 +10,8 @@ use ra_ide_db::{ | |||
10 | symbol_index::{LibrarySymbolsQuery, SymbolIndex}, | 10 | symbol_index::{LibrarySymbolsQuery, SymbolIndex}, |
11 | RootDatabase, | 11 | RootDatabase, |
12 | }; | 12 | }; |
13 | use ra_syntax::{ast, Parse, SyntaxNode}; | ||
14 | use rustc_hash::FxHashMap; | 13 | use rustc_hash::FxHashMap; |
14 | use syntax::{ast, Parse, SyntaxNode}; | ||
15 | 15 | ||
16 | use crate::FileId; | 16 | use crate::FileId; |
17 | 17 | ||
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs index ebdf05127..4b41ceb1d 100644 --- a/crates/ra_ide/src/syntax_highlighting.rs +++ b/crates/ra_ide/src/syntax_highlighting.rs | |||
@@ -9,13 +9,13 @@ use ra_ide_db::{ | |||
9 | defs::{classify_name, classify_name_ref, Definition, NameClass, NameRefClass}, | 9 | defs::{classify_name, classify_name_ref, Definition, NameClass, NameRefClass}, |
10 | RootDatabase, | 10 | RootDatabase, |
11 | }; | 11 | }; |
12 | use ra_syntax::{ | 12 | use rustc_hash::FxHashMap; |
13 | use syntax::{ | ||
13 | ast::{self, HasFormatSpecifier}, | 14 | ast::{self, HasFormatSpecifier}, |
14 | AstNode, AstToken, Direction, NodeOrToken, SyntaxElement, | 15 | AstNode, AstToken, Direction, NodeOrToken, SyntaxElement, |
15 | SyntaxKind::*, | 16 | SyntaxKind::*, |
16 | TextRange, WalkEvent, T, | 17 | TextRange, WalkEvent, T, |
17 | }; | 18 | }; |
18 | use rustc_hash::FxHashMap; | ||
19 | 19 | ||
20 | use crate::FileId; | 20 | use crate::FileId; |
21 | 21 | ||
diff --git a/crates/ra_ide/src/syntax_highlighting/html.rs b/crates/ra_ide/src/syntax_highlighting/html.rs index a5e7d2867..418122648 100644 --- a/crates/ra_ide/src/syntax_highlighting/html.rs +++ b/crates/ra_ide/src/syntax_highlighting/html.rs | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | use oorandom::Rand32; | 3 | use oorandom::Rand32; |
4 | use ra_db::SourceDatabase; | 4 | use ra_db::SourceDatabase; |
5 | use ra_syntax::{AstNode, TextRange, TextSize}; | 5 | use syntax::{AstNode, TextRange, TextSize}; |
6 | 6 | ||
7 | use crate::{syntax_highlighting::highlight, FileId, RootDatabase}; | 7 | use crate::{syntax_highlighting::highlight, FileId, RootDatabase}; |
8 | 8 | ||
diff --git a/crates/ra_ide/src/syntax_highlighting/injection.rs b/crates/ra_ide/src/syntax_highlighting/injection.rs index 6046643ef..43f4e6fea 100644 --- a/crates/ra_ide/src/syntax_highlighting/injection.rs +++ b/crates/ra_ide/src/syntax_highlighting/injection.rs | |||
@@ -5,7 +5,7 @@ use std::{collections::BTreeMap, convert::TryFrom}; | |||
5 | use ast::{HasQuotes, HasStringValue}; | 5 | use ast::{HasQuotes, HasStringValue}; |
6 | use hir::Semantics; | 6 | use hir::Semantics; |
7 | use itertools::Itertools; | 7 | use itertools::Itertools; |
8 | use ra_syntax::{ast, AstToken, SyntaxNode, SyntaxToken, TextRange, TextSize}; | 8 | use syntax::{ast, AstToken, SyntaxNode, SyntaxToken, TextRange, TextSize}; |
9 | 9 | ||
10 | use crate::{ | 10 | use crate::{ |
11 | call_info::ActiveParameter, Analysis, Highlight, HighlightModifier, HighlightTag, | 11 | call_info::ActiveParameter, Analysis, Highlight, HighlightModifier, HighlightTag, |
diff --git a/crates/ra_ide/src/syntax_highlighting/tests.rs b/crates/ra_ide/src/syntax_highlighting/tests.rs index a8087635a..594f61e85 100644 --- a/crates/ra_ide/src/syntax_highlighting/tests.rs +++ b/crates/ra_ide/src/syntax_highlighting/tests.rs | |||
@@ -135,7 +135,7 @@ fn bar() { | |||
135 | 135 | ||
136 | #[test] | 136 | #[test] |
137 | fn accidentally_quadratic() { | 137 | fn accidentally_quadratic() { |
138 | let file = project_dir().join("crates/ra_syntax/test_data/accidentally_quadratic"); | 138 | let file = project_dir().join("crates/syntax/test_data/accidentally_quadratic"); |
139 | let src = fs::read_to_string(file).unwrap(); | 139 | let src = fs::read_to_string(file).unwrap(); |
140 | 140 | ||
141 | let (analysis, file_id) = single_file(&src); | 141 | let (analysis, file_id) = single_file(&src); |
diff --git a/crates/ra_ide/src/syntax_tree.rs b/crates/ra_ide/src/syntax_tree.rs index 07217e808..d05ff2214 100644 --- a/crates/ra_ide/src/syntax_tree.rs +++ b/crates/ra_ide/src/syntax_tree.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use ra_db::{FileId, SourceDatabase}; | 1 | use ra_db::{FileId, SourceDatabase}; |
2 | use ra_ide_db::RootDatabase; | 2 | use ra_ide_db::RootDatabase; |
3 | use ra_syntax::{ | 3 | use syntax::{ |
4 | algo, AstNode, NodeOrToken, SourceFile, | 4 | algo, AstNode, NodeOrToken, SourceFile, |
5 | SyntaxKind::{RAW_STRING, STRING}, | 5 | SyntaxKind::{RAW_STRING, STRING}, |
6 | SyntaxToken, TextRange, TextSize, | 6 | SyntaxToken, TextRange, TextSize, |
diff --git a/crates/ra_ide/src/typing.rs b/crates/ra_ide/src/typing.rs index 952429cde..c408b1d52 100644 --- a/crates/ra_ide/src/typing.rs +++ b/crates/ra_ide/src/typing.rs | |||
@@ -18,7 +18,7 @@ mod on_enter; | |||
18 | use ra_db::{FilePosition, SourceDatabase}; | 18 | use ra_db::{FilePosition, SourceDatabase}; |
19 | use ra_fmt::leading_indent; | 19 | use ra_fmt::leading_indent; |
20 | use ra_ide_db::{source_change::SourceFileEdit, RootDatabase}; | 20 | use ra_ide_db::{source_change::SourceFileEdit, RootDatabase}; |
21 | use ra_syntax::{ | 21 | use syntax::{ |
22 | algo::find_node_at_offset, | 22 | algo::find_node_at_offset, |
23 | ast::{self, AstToken}, | 23 | ast::{self, AstToken}, |
24 | AstNode, SourceFile, | 24 | AstNode, SourceFile, |
diff --git a/crates/ra_ide/src/typing/on_enter.rs b/crates/ra_ide/src/typing/on_enter.rs index c0c5ce3bc..9cd153f94 100644 --- a/crates/ra_ide/src/typing/on_enter.rs +++ b/crates/ra_ide/src/typing/on_enter.rs | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | use ra_db::{FilePosition, SourceDatabase}; | 4 | use ra_db::{FilePosition, SourceDatabase}; |
5 | use ra_ide_db::RootDatabase; | 5 | use ra_ide_db::RootDatabase; |
6 | use ra_syntax::{ | 6 | use syntax::{ |
7 | ast::{self, AstToken}, | 7 | ast::{self, AstToken}, |
8 | AstNode, SmolStr, SourceFile, | 8 | AstNode, SmolStr, SourceFile, |
9 | SyntaxKind::*, | 9 | SyntaxKind::*, |