diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-01-16 17:52:29 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-16 17:52:29 +0000 |
commit | 9a349f280ff1c6d0b57df80aa3d6720474e4b00a (patch) | |
tree | 23bbb365f31438949358a576bc9467fa70fa874e /crates/assists/src/assist_config.rs | |
parent | 3782c78d7558633be5483a04aa1c098fe76100b9 (diff) | |
parent | 497fc232e7d90d8d39c7a13742dd85d758dc2f72 (diff) |
Merge #7295
7295: Share import_assets and related entities r=matklad a=SomeoneToIgnore
Part of https://github.com/rust-analyzer/rust-analyzer/pull/7293
Addresses https://github.com/rust-analyzer/rust-analyzer/pull/7293#issuecomment-761569558
Prepares `import_assets` and related to be used later for the trait fuzzy importing.
Also moves fuzzy imports into a separate completion module and renames them, as suggested in https://github.com/rust-analyzer/rust-analyzer/pull/7293#discussion_r558896685
Co-authored-by: Kirill Bulatov <[email protected]>
Diffstat (limited to 'crates/assists/src/assist_config.rs')
-rw-r--r-- | crates/assists/src/assist_config.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/crates/assists/src/assist_config.rs b/crates/assists/src/assist_config.rs index 4fe8ea761..9cabf037c 100644 --- a/crates/assists/src/assist_config.rs +++ b/crates/assists/src/assist_config.rs | |||
@@ -4,7 +4,7 @@ | |||
4 | //! module, and we use to statically check that we only produce snippet | 4 | //! module, and we use to statically check that we only produce snippet |
5 | //! assists if we are allowed to. | 5 | //! assists if we are allowed to. |
6 | 6 | ||
7 | use ide_db::helpers::{insert_use::MergeBehavior, SnippetCap}; | 7 | use ide_db::helpers::{insert_use::InsertUseConfig, SnippetCap}; |
8 | 8 | ||
9 | use crate::AssistKind; | 9 | use crate::AssistKind; |
10 | 10 | ||
@@ -14,9 +14,3 @@ pub struct AssistConfig { | |||
14 | pub allowed: Option<Vec<AssistKind>>, | 14 | pub allowed: Option<Vec<AssistKind>>, |
15 | pub insert_use: InsertUseConfig, | 15 | pub insert_use: InsertUseConfig, |
16 | } | 16 | } |
17 | |||
18 | #[derive(Clone, Copy, Debug, PartialEq, Eq)] | ||
19 | pub struct InsertUseConfig { | ||
20 | pub merge: Option<MergeBehavior>, | ||
21 | pub prefix_kind: hir::PrefixKind, | ||
22 | } | ||