aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/handlers/fill_match_arms.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-11-28 14:33:57 +0000
committerGitHub <[email protected]>2020-11-28 14:33:57 +0000
commitb7ece77af49ce59762fc3246a4c721411efe637e (patch)
tree81c617c2df781e27b0c16c10515ebcf588cb376e /crates/assists/src/handlers/fill_match_arms.rs
parentfe2ac4480bd71c9cf25d2c21bda82b33558d27a4 (diff)
parent3f612d37c68a6e4c09e407b7cd2ad8a1d17ab4e6 (diff)
Merge #6650
6650: Make completion and assists module independent r=matklad a=SomeoneToIgnore A follow-up of https://github.com/rust-analyzer/rust-analyzer/pull/6553#discussion_r524402907 Move the common code for both assists and completion modules into a separate crate. Co-authored-by: Kirill Bulatov <[email protected]>
Diffstat (limited to 'crates/assists/src/handlers/fill_match_arms.rs')
-rw-r--r--crates/assists/src/handlers/fill_match_arms.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/assists/src/handlers/fill_match_arms.rs b/crates/assists/src/handlers/fill_match_arms.rs
index eda45f5b3..ef12ef0cf 100644
--- a/crates/assists/src/handlers/fill_match_arms.rs
+++ b/crates/assists/src/handlers/fill_match_arms.rs
@@ -1,13 +1,14 @@
1use std::iter; 1use std::iter;
2 2
3use hir::{Adt, HasSource, ModuleDef, Semantics}; 3use hir::{Adt, HasSource, ModuleDef, Semantics};
4use ide_db::helpers::{mod_path_to_ast, FamousDefs};
4use ide_db::RootDatabase; 5use ide_db::RootDatabase;
5use itertools::Itertools; 6use itertools::Itertools;
6use syntax::ast::{self, make, AstNode, MatchArm, NameOwner, Pat}; 7use syntax::ast::{self, make, AstNode, MatchArm, NameOwner, Pat};
7use test_utils::mark; 8use test_utils::mark;
8 9
9use crate::{ 10use crate::{
10 utils::{mod_path_to_ast, render_snippet, Cursor, FamousDefs}, 11 utils::{render_snippet, Cursor},
11 AssistContext, AssistId, AssistKind, Assists, 12 AssistContext, AssistId, AssistKind, Assists,
12}; 13};
13 14
@@ -212,12 +213,10 @@ fn build_pat(db: &RootDatabase, module: hir::Module, var: hir::EnumVariant) -> O
212 213
213#[cfg(test)] 214#[cfg(test)]
214mod tests { 215mod tests {
216 use ide_db::helpers::FamousDefs;
215 use test_utils::mark; 217 use test_utils::mark;
216 218
217 use crate::{ 219 use crate::tests::{check_assist, check_assist_not_applicable, check_assist_target};
218 tests::{check_assist, check_assist_not_applicable, check_assist_target},
219 utils::FamousDefs,
220 };
221 220
222 use super::fill_match_arms; 221 use super::fill_match_arms;
223 222