diff options
author | Lukas Wirth <[email protected]> | 2021-04-20 18:28:18 +0100 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-04-20 18:34:43 +0100 |
commit | b290cd578260f307e872a95f971e5a7c656a80ed (patch) | |
tree | 25e94bc1e043745d2b6bed3efa2ffe699a3cee7c /crates/ide_completion | |
parent | 2c8f1b5c301a5d7a84d3c74a9fc48ef76cd11bd6 (diff) |
Add cov_marks to insert_use tests
Diffstat (limited to 'crates/ide_completion')
-rw-r--r-- | crates/ide_completion/src/completions/flyimport.rs | 2 | ||||
-rw-r--r-- | crates/ide_completion/src/lib.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide_completion/src/completions/flyimport.rs b/crates/ide_completion/src/completions/flyimport.rs index 8e211ae1e..9d5b61562 100644 --- a/crates/ide_completion/src/completions/flyimport.rs +++ b/crates/ide_completion/src/completions/flyimport.rs | |||
@@ -132,7 +132,7 @@ pub(crate) fn import_on_the_fly(acc: &mut Completions, ctx: &CompletionContext) | |||
132 | 132 | ||
133 | let user_input_lowercased = potential_import_name.to_lowercase(); | 133 | let user_input_lowercased = potential_import_name.to_lowercase(); |
134 | let import_assets = import_assets(ctx, potential_import_name)?; | 134 | let import_assets = import_assets(ctx, potential_import_name)?; |
135 | let import_scope = ImportScope::find_insert_use_container( | 135 | let import_scope = ImportScope::find_insert_use_container_with_macros( |
136 | position_for_import(ctx, Some(import_assets.import_candidate()))?, | 136 | position_for_import(ctx, Some(import_assets.import_candidate()))?, |
137 | &ctx.sema, | 137 | &ctx.sema, |
138 | )?; | 138 | )?; |
diff --git a/crates/ide_completion/src/lib.rs b/crates/ide_completion/src/lib.rs index 6f3d5c5c5..e32633565 100644 --- a/crates/ide_completion/src/lib.rs +++ b/crates/ide_completion/src/lib.rs | |||
@@ -179,7 +179,7 @@ pub fn resolve_completion_edits( | |||
179 | ) -> Option<Vec<TextEdit>> { | 179 | ) -> Option<Vec<TextEdit>> { |
180 | let ctx = CompletionContext::new(db, position, config)?; | 180 | let ctx = CompletionContext::new(db, position, config)?; |
181 | let position_for_import = position_for_import(&ctx, None)?; | 181 | let position_for_import = position_for_import(&ctx, None)?; |
182 | let scope = ImportScope::find_insert_use_container(position_for_import, &ctx.sema)?; | 182 | let scope = ImportScope::find_insert_use_container_with_macros(position_for_import, &ctx.sema)?; |
183 | 183 | ||
184 | let current_module = ctx.sema.scope(position_for_import).module()?; | 184 | let current_module = ctx.sema.scope(position_for_import).module()?; |
185 | let current_crate = current_module.krate(); | 185 | let current_crate = current_module.krate(); |