From a1c187eef3ba08076aedb5154929f7eda8d1b424 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 12 Aug 2020 18:26:51 +0200 Subject: Rename ra_syntax -> syntax --- crates/ra_assists/src/assist_context.rs | 4 ++-- crates/ra_assists/src/ast_transform.rs | 22 ++++++++-------------- crates/ra_assists/src/handlers/add_custom_impl.rs | 2 +- .../ra_assists/src/handlers/add_explicit_type.rs | 2 +- .../src/handlers/add_missing_impl_members.rs | 2 +- crates/ra_assists/src/handlers/add_turbo_fish.rs | 2 +- crates/ra_assists/src/handlers/apply_demorgan.rs | 2 +- crates/ra_assists/src/handlers/auto_import.rs | 4 ++-- .../src/handlers/change_return_type_to_result.rs | 2 +- .../ra_assists/src/handlers/change_visibility.rs | 2 +- crates/ra_assists/src/handlers/early_return.rs | 2 +- .../ra_assists/src/handlers/expand_glob_import.rs | 2 +- .../handlers/extract_struct_from_enum_variant.rs | 4 ++-- crates/ra_assists/src/handlers/extract_variable.rs | 4 ++-- crates/ra_assists/src/handlers/fill_match_arms.rs | 2 +- crates/ra_assists/src/handlers/fix_visibility.rs | 2 +- crates/ra_assists/src/handlers/flip_binexpr.rs | 2 +- crates/ra_assists/src/handlers/flip_comma.rs | 2 +- crates/ra_assists/src/handlers/flip_trait_bound.rs | 2 +- crates/ra_assists/src/handlers/generate_derive.rs | 2 +- .../src/handlers/generate_from_impl_for_enum.rs | 2 +- .../ra_assists/src/handlers/generate_function.rs | 4 ++-- crates/ra_assists/src/handlers/generate_impl.rs | 2 +- crates/ra_assists/src/handlers/generate_new.rs | 4 ++-- .../src/handlers/inline_local_variable.rs | 2 +- .../src/handlers/introduce_named_lifetime.rs | 4 ++-- crates/ra_assists/src/handlers/invert_if.rs | 2 +- crates/ra_assists/src/handlers/merge_imports.rs | 2 +- crates/ra_assists/src/handlers/merge_match_arms.rs | 2 +- crates/ra_assists/src/handlers/move_bounds.rs | 2 +- crates/ra_assists/src/handlers/move_guard.rs | 2 +- crates/ra_assists/src/handlers/raw_string.rs | 2 +- crates/ra_assists/src/handlers/remove_dbg.rs | 2 +- crates/ra_assists/src/handlers/remove_mut.rs | 2 +- crates/ra_assists/src/handlers/reorder_fields.rs | 2 +- .../src/handlers/replace_if_let_with_match.rs | 2 +- .../src/handlers/replace_let_with_if_let.rs | 2 +- .../handlers/replace_qualified_name_with_use.rs | 2 +- .../src/handlers/replace_unwrap_with_match.rs | 2 +- crates/ra_assists/src/handlers/split_import.rs | 2 +- crates/ra_assists/src/handlers/unwrap_block.rs | 2 +- crates/ra_assists/src/lib.rs | 2 +- crates/ra_assists/src/tests.rs | 2 +- crates/ra_assists/src/utils.rs | 4 ++-- crates/ra_assists/src/utils/insert_use.rs | 2 +- 45 files changed, 60 insertions(+), 66 deletions(-) (limited to 'crates/ra_assists/src') diff --git a/crates/ra_assists/src/assist_context.rs b/crates/ra_assists/src/assist_context.rs index fcaa1aedc..217f692a4 100644 --- a/crates/ra_assists/src/assist_context.rs +++ b/crates/ra_assists/src/assist_context.rs @@ -10,7 +10,7 @@ use ra_ide_db::{ source_change::{SourceChange, SourceFileEdit}, RootDatabase, }; -use ra_syntax::{ +use syntax::{ algo::{self, find_node_at_offset, SyntaxRewriter}, AstNode, SourceFile, SyntaxElement, SyntaxKind, SyntaxNode, SyntaxToken, TextRange, TextSize, TokenAtOffset, @@ -271,7 +271,7 @@ impl AssistBuilder { } /// Replaces specified `node` of text with a given string, reindenting the /// string to maintain `node`'s existing indent. - // FIXME: remove in favor of ra_syntax::edit::IndentLevel::increase_indent + // FIXME: remove in favor of syntax::edit::IndentLevel::increase_indent pub(crate) fn replace_node_and_indent( &mut self, node: &SyntaxNode, diff --git a/crates/ra_assists/src/ast_transform.rs b/crates/ra_assists/src/ast_transform.rs index 07c978378..4c41c16d8 100644 --- a/crates/ra_assists/src/ast_transform.rs +++ b/crates/ra_assists/src/ast_transform.rs @@ -2,13 +2,13 @@ use rustc_hash::FxHashMap; use hir::{HirDisplay, PathResolution, SemanticsScope}; -use ra_syntax::{ +use syntax::{ algo::SyntaxRewriter, ast::{self, AstNode}, }; pub trait AstTransform<'a> { - fn get_substitution(&self, node: &ra_syntax::SyntaxNode) -> Option; + fn get_substitution(&self, node: &syntax::SyntaxNode) -> Option; fn chain_before(self, other: Box + 'a>) -> Box + 'a>; fn or + 'a>(self, other: T) -> Box + 'a> @@ -22,7 +22,7 @@ pub trait AstTransform<'a> { struct NullTransformer; impl<'a> AstTransform<'a> for NullTransformer { - fn get_substitution(&self, _node: &ra_syntax::SyntaxNode) -> Option { + fn get_substitution(&self, _node: &syntax::SyntaxNode) -> Option { None } fn chain_before(self, other: Box + 'a>) -> Box + 'a> { @@ -101,10 +101,7 @@ impl<'a> SubstituteTypeParams<'a> { Some(result) } } - fn get_substitution_inner( - &self, - node: &ra_syntax::SyntaxNode, - ) -> Option { + fn get_substitution_inner(&self, node: &syntax::SyntaxNode) -> Option { let type_ref = ast::Type::cast(node.clone())?; let path = match &type_ref { ast::Type::PathType(path_type) => path_type.path()?, @@ -122,7 +119,7 @@ impl<'a> SubstituteTypeParams<'a> { } impl<'a> AstTransform<'a> for SubstituteTypeParams<'a> { - fn get_substitution(&self, node: &ra_syntax::SyntaxNode) -> Option { + fn get_substitution(&self, node: &syntax::SyntaxNode) -> Option { self.get_substitution_inner(node).or_else(|| self.previous.get_substitution(node)) } fn chain_before(self, other: Box + 'a>) -> Box + 'a> { @@ -141,10 +138,7 @@ impl<'a> QualifyPaths<'a> { Self { target_scope, source_scope, previous: Box::new(NullTransformer) } } - fn get_substitution_inner( - &self, - node: &ra_syntax::SyntaxNode, - ) -> Option { + fn get_substitution_inner(&self, node: &syntax::SyntaxNode) -> Option { // FIXME handle value ns? let from = self.target_scope.module()?; let p = ast::Path::cast(node.clone())?; @@ -183,7 +177,7 @@ impl<'a> QualifyPaths<'a> { pub fn apply<'a, N: AstNode>(transformer: &dyn AstTransform<'a>, node: N) -> N { SyntaxRewriter::from_fn(|element| match element { - ra_syntax::SyntaxElement::Node(n) => { + syntax::SyntaxElement::Node(n) => { let replacement = transformer.get_substitution(&n)?; Some(replacement.into()) } @@ -193,7 +187,7 @@ pub fn apply<'a, N: AstNode>(transformer: &dyn AstTransform<'a>, node: N) -> N { } impl<'a> AstTransform<'a> for QualifyPaths<'a> { - fn get_substitution(&self, node: &ra_syntax::SyntaxNode) -> Option { + fn get_substitution(&self, node: &syntax::SyntaxNode) -> Option { self.get_substitution_inner(node).or_else(|| self.previous.get_substitution(node)) } fn chain_before(self, other: Box + 'a>) -> Box + 'a> { diff --git a/crates/ra_assists/src/handlers/add_custom_impl.rs b/crates/ra_assists/src/handlers/add_custom_impl.rs index ebdf00e67..8757fa33f 100644 --- a/crates/ra_assists/src/handlers/add_custom_impl.rs +++ b/crates/ra_assists/src/handlers/add_custom_impl.rs @@ -1,5 +1,5 @@ use itertools::Itertools; -use ra_syntax::{ +use syntax::{ ast::{self, AstNode}, Direction, SmolStr, SyntaxKind::{IDENT, WHITESPACE}, diff --git a/crates/ra_assists/src/handlers/add_explicit_type.rs b/crates/ra_assists/src/handlers/add_explicit_type.rs index 135a2ac9c..563cbf505 100644 --- a/crates/ra_assists/src/handlers/add_explicit_type.rs +++ b/crates/ra_assists/src/handlers/add_explicit_type.rs @@ -1,5 +1,5 @@ use hir::HirDisplay; -use ra_syntax::{ +use syntax::{ ast::{self, AstNode, LetStmt, NameOwner}, TextRange, }; diff --git a/crates/ra_assists/src/handlers/add_missing_impl_members.rs b/crates/ra_assists/src/handlers/add_missing_impl_members.rs index dd1406228..81b61ebf8 100644 --- a/crates/ra_assists/src/handlers/add_missing_impl_members.rs +++ b/crates/ra_assists/src/handlers/add_missing_impl_members.rs @@ -1,5 +1,5 @@ use hir::HasSource; -use ra_syntax::{ +use syntax::{ ast::{ self, edit::{self, AstNodeEdit, IndentLevel}, diff --git a/crates/ra_assists/src/handlers/add_turbo_fish.rs b/crates/ra_assists/src/handlers/add_turbo_fish.rs index 537322a72..8c7ffae3d 100644 --- a/crates/ra_assists/src/handlers/add_turbo_fish.rs +++ b/crates/ra_assists/src/handlers/add_turbo_fish.rs @@ -1,5 +1,5 @@ use ra_ide_db::defs::{classify_name_ref, Definition, NameRefClass}; -use ra_syntax::{ast, AstNode, SyntaxKind, T}; +use syntax::{ast, AstNode, SyntaxKind, T}; use test_utils::mark; use crate::{ diff --git a/crates/ra_assists/src/handlers/apply_demorgan.rs b/crates/ra_assists/src/handlers/apply_demorgan.rs index 3ac4aed7d..1a6fdafda 100644 --- a/crates/ra_assists/src/handlers/apply_demorgan.rs +++ b/crates/ra_assists/src/handlers/apply_demorgan.rs @@ -1,4 +1,4 @@ -use ra_syntax::ast::{self, AstNode}; +use syntax::ast::{self, AstNode}; use crate::{utils::invert_boolean_expression, AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/auto_import.rs b/crates/ra_assists/src/handlers/auto_import.rs index 6ec59ec4d..e19b197d9 100644 --- a/crates/ra_assists/src/handlers/auto_import.rs +++ b/crates/ra_assists/src/handlers/auto_import.rs @@ -6,11 +6,11 @@ use hir::{ Type, }; use ra_ide_db::{imports_locator, RootDatabase}; -use ra_syntax::{ +use rustc_hash::FxHashSet; +use syntax::{ ast::{self, AstNode}, SyntaxNode, }; -use rustc_hash::FxHashSet; use crate::{ utils::insert_use_statement, AssistContext, AssistId, AssistKind, Assists, GroupLabel, diff --git a/crates/ra_assists/src/handlers/change_return_type_to_result.rs b/crates/ra_assists/src/handlers/change_return_type_to_result.rs index b83c94404..d5a68a24c 100644 --- a/crates/ra_assists/src/handlers/change_return_type_to_result.rs +++ b/crates/ra_assists/src/handlers/change_return_type_to_result.rs @@ -1,4 +1,4 @@ -use ra_syntax::{ +use syntax::{ ast::{self, BlockExpr, Expr, LoopBodyOwner}, AstNode, SyntaxNode, }; diff --git a/crates/ra_assists/src/handlers/change_visibility.rs b/crates/ra_assists/src/handlers/change_visibility.rs index 724daa93f..32dc05378 100644 --- a/crates/ra_assists/src/handlers/change_visibility.rs +++ b/crates/ra_assists/src/handlers/change_visibility.rs @@ -1,4 +1,4 @@ -use ra_syntax::{ +use syntax::{ ast::{self, NameOwner, VisibilityOwner}, AstNode, SyntaxKind::{CONST, ENUM, FN, MODULE, STATIC, STRUCT, TRAIT, VISIBILITY}, diff --git a/crates/ra_assists/src/handlers/early_return.rs b/crates/ra_assists/src/handlers/early_return.rs index 6816a2709..7fd78e9d4 100644 --- a/crates/ra_assists/src/handlers/early_return.rs +++ b/crates/ra_assists/src/handlers/early_return.rs @@ -1,6 +1,6 @@ use std::{iter::once, ops::RangeInclusive}; -use ra_syntax::{ +use syntax::{ algo::replace_children, ast::{ self, diff --git a/crates/ra_assists/src/handlers/expand_glob_import.rs b/crates/ra_assists/src/handlers/expand_glob_import.rs index eb216a81a..cf34ffaf7 100644 --- a/crates/ra_assists/src/handlers/expand_glob_import.rs +++ b/crates/ra_assists/src/handlers/expand_glob_import.rs @@ -3,7 +3,7 @@ use ra_ide_db::{ defs::{classify_name_ref, Definition, NameRefClass}, RootDatabase, }; -use ra_syntax::{algo, ast, match_ast, AstNode, SyntaxNode, SyntaxToken, T}; +use syntax::{algo, ast, match_ast, AstNode, SyntaxNode, SyntaxToken, T}; use crate::{ assist_context::{AssistBuilder, AssistContext, Assists}, diff --git a/crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs b/crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs index ccec688ca..6e9f2d0fc 100644 --- a/crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs +++ b/crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs @@ -2,12 +2,12 @@ use hir::{EnumVariant, Module, ModuleDef, Name}; use ra_db::FileId; use ra_fmt::leading_indent; use ra_ide_db::{defs::Definition, search::Reference, RootDatabase}; -use ra_syntax::{ +use rustc_hash::FxHashSet; +use syntax::{ algo::find_node_at_offset, ast::{self, ArgListOwner, AstNode, NameOwner, VisibilityOwner}, SourceFile, SyntaxNode, TextRange, TextSize, }; -use rustc_hash::FxHashSet; use crate::{ assist_context::AssistBuilder, utils::insert_use_statement, AssistContext, AssistId, diff --git a/crates/ra_assists/src/handlers/extract_variable.rs b/crates/ra_assists/src/handlers/extract_variable.rs index cc62db0c4..d2ae137cd 100644 --- a/crates/ra_assists/src/handlers/extract_variable.rs +++ b/crates/ra_assists/src/handlers/extract_variable.rs @@ -1,11 +1,11 @@ -use ra_syntax::{ +use stdx::format_to; +use syntax::{ ast::{self, AstNode}, SyntaxKind::{ BLOCK_EXPR, BREAK_EXPR, CLOSURE_EXPR, COMMENT, LOOP_EXPR, MATCH_ARM, PATH_EXPR, RETURN_EXPR, }, SyntaxNode, }; -use stdx::format_to; use test_utils::mark; use crate::{AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/fill_match_arms.rs b/crates/ra_assists/src/handlers/fill_match_arms.rs index 6698d1a27..8f6660637 100644 --- a/crates/ra_assists/src/handlers/fill_match_arms.rs +++ b/crates/ra_assists/src/handlers/fill_match_arms.rs @@ -3,7 +3,7 @@ use std::iter; use hir::{Adt, HasSource, ModuleDef, Semantics}; use itertools::Itertools; use ra_ide_db::RootDatabase; -use ra_syntax::ast::{self, make, AstNode, MatchArm, NameOwner, Pat}; +use syntax::ast::{self, make, AstNode, MatchArm, NameOwner, Pat}; use test_utils::mark; use crate::{ diff --git a/crates/ra_assists/src/handlers/fix_visibility.rs b/crates/ra_assists/src/handlers/fix_visibility.rs index a19dbf33f..b6cc1a320 100644 --- a/crates/ra_assists/src/handlers/fix_visibility.rs +++ b/crates/ra_assists/src/handlers/fix_visibility.rs @@ -1,6 +1,6 @@ use hir::{db::HirDatabase, HasSource, HasVisibility, PathResolution}; use ra_db::FileId; -use ra_syntax::{ast, AstNode, TextRange, TextSize}; +use syntax::{ast, AstNode, TextRange, TextSize}; use crate::{utils::vis_offset, AssistContext, AssistId, AssistKind, Assists}; use ast::VisibilityOwner; diff --git a/crates/ra_assists/src/handlers/flip_binexpr.rs b/crates/ra_assists/src/handlers/flip_binexpr.rs index 3cd532650..404f06133 100644 --- a/crates/ra_assists/src/handlers/flip_binexpr.rs +++ b/crates/ra_assists/src/handlers/flip_binexpr.rs @@ -1,4 +1,4 @@ -use ra_syntax::ast::{AstNode, BinExpr, BinOp}; +use syntax::ast::{AstNode, BinExpr, BinOp}; use crate::{AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/flip_comma.rs b/crates/ra_assists/src/handlers/flip_comma.rs index 55a971dc7..5c69db53e 100644 --- a/crates/ra_assists/src/handlers/flip_comma.rs +++ b/crates/ra_assists/src/handlers/flip_comma.rs @@ -1,4 +1,4 @@ -use ra_syntax::{algo::non_trivia_sibling, Direction, T}; +use syntax::{algo::non_trivia_sibling, Direction, T}; use crate::{AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/flip_trait_bound.rs b/crates/ra_assists/src/handlers/flip_trait_bound.rs index 1234f4d29..347e79b1d 100644 --- a/crates/ra_assists/src/handlers/flip_trait_bound.rs +++ b/crates/ra_assists/src/handlers/flip_trait_bound.rs @@ -1,4 +1,4 @@ -use ra_syntax::{ +use syntax::{ algo::non_trivia_sibling, ast::{self, AstNode}, Direction, T, diff --git a/crates/ra_assists/src/handlers/generate_derive.rs b/crates/ra_assists/src/handlers/generate_derive.rs index 90ece9fab..314504e15 100644 --- a/crates/ra_assists/src/handlers/generate_derive.rs +++ b/crates/ra_assists/src/handlers/generate_derive.rs @@ -1,4 +1,4 @@ -use ra_syntax::{ +use syntax::{ ast::{self, AstNode, AttrsOwner}, SyntaxKind::{COMMENT, WHITESPACE}, TextSize, diff --git a/crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs b/crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs index 4c1aef8a2..302b6b67d 100644 --- a/crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs +++ b/crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs @@ -1,5 +1,5 @@ use ra_ide_db::RootDatabase; -use ra_syntax::ast::{self, AstNode, NameOwner}; +use syntax::ast::{self, AstNode, NameOwner}; use test_utils::mark; use crate::{utils::FamousDefs, AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/generate_function.rs b/crates/ra_assists/src/handlers/generate_function.rs index acc97e648..b5df44101 100644 --- a/crates/ra_assists/src/handlers/generate_function.rs +++ b/crates/ra_assists/src/handlers/generate_function.rs @@ -1,6 +1,7 @@ use hir::HirDisplay; use ra_db::FileId; -use ra_syntax::{ +use rustc_hash::{FxHashMap, FxHashSet}; +use syntax::{ ast::{ self, edit::{AstNodeEdit, IndentLevel}, @@ -8,7 +9,6 @@ use ra_syntax::{ }, SyntaxKind, SyntaxNode, TextSize, }; -use rustc_hash::{FxHashMap, FxHashSet}; use crate::{ assist_config::SnippetCap, diff --git a/crates/ra_assists/src/handlers/generate_impl.rs b/crates/ra_assists/src/handlers/generate_impl.rs index 7162dc184..9989109b5 100644 --- a/crates/ra_assists/src/handlers/generate_impl.rs +++ b/crates/ra_assists/src/handlers/generate_impl.rs @@ -1,6 +1,6 @@ use itertools::Itertools; -use ra_syntax::ast::{self, AstNode, GenericParamsOwner, NameOwner}; use stdx::format_to; +use syntax::ast::{self, AstNode, GenericParamsOwner, NameOwner}; use crate::{AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/generate_new.rs b/crates/ra_assists/src/handlers/generate_new.rs index 32dfed274..7db10f276 100644 --- a/crates/ra_assists/src/handlers/generate_new.rs +++ b/crates/ra_assists/src/handlers/generate_new.rs @@ -1,10 +1,10 @@ use hir::Adt; use itertools::Itertools; -use ra_syntax::{ +use stdx::format_to; +use syntax::{ ast::{self, AstNode, GenericParamsOwner, NameOwner, StructKind, VisibilityOwner}, T, }; -use stdx::format_to; use crate::{AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/inline_local_variable.rs b/crates/ra_assists/src/handlers/inline_local_variable.rs index 3c58020f8..531592320 100644 --- a/crates/ra_assists/src/handlers/inline_local_variable.rs +++ b/crates/ra_assists/src/handlers/inline_local_variable.rs @@ -1,5 +1,5 @@ use ra_ide_db::defs::Definition; -use ra_syntax::{ +use syntax::{ ast::{self, AstNode, AstToken}, TextRange, }; diff --git a/crates/ra_assists/src/handlers/introduce_named_lifetime.rs b/crates/ra_assists/src/handlers/introduce_named_lifetime.rs index fbaf3c06b..5f623e5f7 100644 --- a/crates/ra_assists/src/handlers/introduce_named_lifetime.rs +++ b/crates/ra_assists/src/handlers/introduce_named_lifetime.rs @@ -1,8 +1,8 @@ -use ra_syntax::{ +use rustc_hash::FxHashSet; +use syntax::{ ast::{self, GenericParamsOwner, NameOwner}, AstNode, SyntaxKind, TextRange, TextSize, }; -use rustc_hash::FxHashSet; use crate::{assist_context::AssistBuilder, AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/invert_if.rs b/crates/ra_assists/src/handlers/invert_if.rs index bbe3f3643..f0e047538 100644 --- a/crates/ra_assists/src/handlers/invert_if.rs +++ b/crates/ra_assists/src/handlers/invert_if.rs @@ -1,4 +1,4 @@ -use ra_syntax::{ +use syntax::{ ast::{self, AstNode}, T, }; diff --git a/crates/ra_assists/src/handlers/merge_imports.rs b/crates/ra_assists/src/handlers/merge_imports.rs index c775fe25c..9c5c6eda7 100644 --- a/crates/ra_assists/src/handlers/merge_imports.rs +++ b/crates/ra_assists/src/handlers/merge_imports.rs @@ -1,6 +1,6 @@ use std::iter::successors; -use ra_syntax::{ +use syntax::{ algo::{neighbor, skip_trivia_token, SyntaxRewriter}, ast::{self, edit::AstNodeEdit, make}, AstNode, Direction, InsertPosition, SyntaxElement, T, diff --git a/crates/ra_assists/src/handlers/merge_match_arms.rs b/crates/ra_assists/src/handlers/merge_match_arms.rs index 563292282..c347eb40e 100644 --- a/crates/ra_assists/src/handlers/merge_match_arms.rs +++ b/crates/ra_assists/src/handlers/merge_match_arms.rs @@ -1,6 +1,6 @@ use std::iter::successors; -use ra_syntax::{ +use syntax::{ algo::neighbor, ast::{self, AstNode}, Direction, diff --git a/crates/ra_assists/src/handlers/move_bounds.rs b/crates/ra_assists/src/handlers/move_bounds.rs index 6d394443e..e2e461520 100644 --- a/crates/ra_assists/src/handlers/move_bounds.rs +++ b/crates/ra_assists/src/handlers/move_bounds.rs @@ -1,4 +1,4 @@ -use ra_syntax::{ +use syntax::{ ast::{self, edit::AstNodeEdit, make, AstNode, NameOwner, TypeBoundsOwner}, match_ast, SyntaxKind::*, diff --git a/crates/ra_assists/src/handlers/move_guard.rs b/crates/ra_assists/src/handlers/move_guard.rs index 4060d34c6..c62ebc306 100644 --- a/crates/ra_assists/src/handlers/move_guard.rs +++ b/crates/ra_assists/src/handlers/move_guard.rs @@ -1,4 +1,4 @@ -use ra_syntax::{ +use syntax::{ ast::{AstNode, IfExpr, MatchArm}, SyntaxKind::WHITESPACE, }; diff --git a/crates/ra_assists/src/handlers/raw_string.rs b/crates/ra_assists/src/handlers/raw_string.rs index 4c797178f..9ddd116e0 100644 --- a/crates/ra_assists/src/handlers/raw_string.rs +++ b/crates/ra_assists/src/handlers/raw_string.rs @@ -1,6 +1,6 @@ use std::borrow::Cow; -use ra_syntax::{ +use syntax::{ ast::{self, HasQuotes, HasStringValue}, AstToken, SyntaxKind::{RAW_STRING, STRING}, diff --git a/crates/ra_assists/src/handlers/remove_dbg.rs b/crates/ra_assists/src/handlers/remove_dbg.rs index 9430ce1b5..f3dcca534 100644 --- a/crates/ra_assists/src/handlers/remove_dbg.rs +++ b/crates/ra_assists/src/handlers/remove_dbg.rs @@ -1,4 +1,4 @@ -use ra_syntax::{ +use syntax::{ ast::{self, AstNode}, TextRange, TextSize, T, }; diff --git a/crates/ra_assists/src/handlers/remove_mut.rs b/crates/ra_assists/src/handlers/remove_mut.rs index ef55c354e..44f41daa9 100644 --- a/crates/ra_assists/src/handlers/remove_mut.rs +++ b/crates/ra_assists/src/handlers/remove_mut.rs @@ -1,4 +1,4 @@ -use ra_syntax::{SyntaxKind, TextRange, T}; +use syntax::{SyntaxKind, TextRange, T}; use crate::{AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/reorder_fields.rs b/crates/ra_assists/src/handlers/reorder_fields.rs index c9b743a06..013720dfc 100644 --- a/crates/ra_assists/src/handlers/reorder_fields.rs +++ b/crates/ra_assists/src/handlers/reorder_fields.rs @@ -3,7 +3,7 @@ use rustc_hash::FxHashMap; use hir::{Adt, ModuleDef, PathResolution, Semantics, Struct}; use ra_ide_db::RootDatabase; -use ra_syntax::{algo, ast, match_ast, AstNode, SyntaxKind, SyntaxKind::*, SyntaxNode}; +use syntax::{algo, ast, match_ast, AstNode, SyntaxKind, SyntaxKind::*, SyntaxNode}; use crate::{AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/replace_if_let_with_match.rs b/crates/ra_assists/src/handlers/replace_if_let_with_match.rs index ecafb74a1..2442f049b 100644 --- a/crates/ra_assists/src/handlers/replace_if_let_with_match.rs +++ b/crates/ra_assists/src/handlers/replace_if_let_with_match.rs @@ -1,5 +1,5 @@ use ra_fmt::unwrap_trivial_block; -use ra_syntax::{ +use syntax::{ ast::{ self, edit::{AstNodeEdit, IndentLevel}, diff --git a/crates/ra_assists/src/handlers/replace_let_with_if_let.rs b/crates/ra_assists/src/handlers/replace_let_with_if_let.rs index e4d436dec..ed6d0c29b 100644 --- a/crates/ra_assists/src/handlers/replace_let_with_if_let.rs +++ b/crates/ra_assists/src/handlers/replace_let_with_if_let.rs @@ -1,6 +1,6 @@ use std::iter::once; -use ra_syntax::{ +use syntax::{ ast::{ self, edit::{AstNodeEdit, IndentLevel}, diff --git a/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs b/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs index da0a860c5..011bf1106 100644 --- a/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs +++ b/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs @@ -1,5 +1,5 @@ use hir; -use ra_syntax::{algo::SyntaxRewriter, ast, match_ast, AstNode, SmolStr, SyntaxNode}; +use syntax::{algo::SyntaxRewriter, ast, match_ast, AstNode, SmolStr, SyntaxNode}; use crate::{ utils::{find_insert_use_container, insert_use_statement}, diff --git a/crates/ra_assists/src/handlers/replace_unwrap_with_match.rs b/crates/ra_assists/src/handlers/replace_unwrap_with_match.rs index d69f2c1b0..9705f11b7 100644 --- a/crates/ra_assists/src/handlers/replace_unwrap_with_match.rs +++ b/crates/ra_assists/src/handlers/replace_unwrap_with_match.rs @@ -1,6 +1,6 @@ use std::iter; -use ra_syntax::{ +use syntax::{ ast::{ self, edit::{AstNodeEdit, IndentLevel}, diff --git a/crates/ra_assists/src/handlers/split_import.rs b/crates/ra_assists/src/handlers/split_import.rs index 4ca5c3ca1..15e67eaa1 100644 --- a/crates/ra_assists/src/handlers/split_import.rs +++ b/crates/ra_assists/src/handlers/split_import.rs @@ -1,6 +1,6 @@ use std::iter::successors; -use ra_syntax::{ast, AstNode, T}; +use syntax::{ast, AstNode, T}; use crate::{AssistContext, AssistId, AssistKind, Assists}; diff --git a/crates/ra_assists/src/handlers/unwrap_block.rs b/crates/ra_assists/src/handlers/unwrap_block.rs index 8b38695a9..2879090b8 100644 --- a/crates/ra_assists/src/handlers/unwrap_block.rs +++ b/crates/ra_assists/src/handlers/unwrap_block.rs @@ -1,5 +1,5 @@ use ra_fmt::unwrap_trivial_block; -use ra_syntax::{ +use syntax::{ ast::{ self, edit::{AstNodeEdit, IndentLevel}, diff --git a/crates/ra_assists/src/lib.rs b/crates/ra_assists/src/lib.rs index 890996a68..e2ef561fe 100644 --- a/crates/ra_assists/src/lib.rs +++ b/crates/ra_assists/src/lib.rs @@ -20,7 +20,7 @@ pub mod ast_transform; use hir::Semantics; use ra_db::FileRange; use ra_ide_db::{source_change::SourceChange, RootDatabase}; -use ra_syntax::TextRange; +use syntax::TextRange; pub(crate) use crate::assist_context::{AssistContext, Assists}; diff --git a/crates/ra_assists/src/tests.rs b/crates/ra_assists/src/tests.rs index e73836422..1ae7aaa09 100644 --- a/crates/ra_assists/src/tests.rs +++ b/crates/ra_assists/src/tests.rs @@ -3,7 +3,7 @@ mod generated; use hir::Semantics; use ra_db::{fixture::WithFixture, FileId, FileRange, SourceDatabaseExt}; use ra_ide_db::RootDatabase; -use ra_syntax::TextRange; +use syntax::TextRange; use test_utils::{assert_eq_text, extract_offset, extract_range}; use crate::{handlers::Handler, Assist, AssistConfig, AssistContext, AssistKind, Assists}; diff --git a/crates/ra_assists/src/utils.rs b/crates/ra_assists/src/utils.rs index 0de6fdf3f..6d85661c4 100644 --- a/crates/ra_assists/src/utils.rs +++ b/crates/ra_assists/src/utils.rs @@ -5,13 +5,13 @@ use std::{iter, ops}; use hir::{Adt, Crate, Enum, ScopeDef, Semantics, Trait, Type}; use ra_ide_db::RootDatabase; -use ra_syntax::{ +use rustc_hash::FxHashSet; +use syntax::{ ast::{self, make, NameOwner}, AstNode, SyntaxKind::*, SyntaxNode, TextSize, T, }; -use rustc_hash::FxHashSet; use crate::assist_config::SnippetCap; diff --git a/crates/ra_assists/src/utils/insert_use.rs b/crates/ra_assists/src/utils/insert_use.rs index 13dbe1919..f89c288da 100644 --- a/crates/ra_assists/src/utils/insert_use.rs +++ b/crates/ra_assists/src/utils/insert_use.rs @@ -4,7 +4,7 @@ use either::Either; use hir::{self, ModPath}; -use ra_syntax::{ +use syntax::{ ast::{self, NameOwner, VisibilityOwner}, AstNode, Direction, SmolStr, SyntaxKind::{PATH, PATH_SEGMENT}, -- cgit v1.2.3