diff options
Diffstat (limited to 'crates/ide_completion/src/completions/flyimport.rs')
-rw-r--r-- | crates/ide_completion/src/completions/flyimport.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/crates/ide_completion/src/completions/flyimport.rs b/crates/ide_completion/src/completions/flyimport.rs index 9d5b61562..be9cfbded 100644 --- a/crates/ide_completion/src/completions/flyimport.rs +++ b/crates/ide_completion/src/completions/flyimport.rs | |||
@@ -110,13 +110,7 @@ pub(crate) fn import_on_the_fly(acc: &mut Completions, ctx: &CompletionContext) | |||
110 | if !ctx.config.enable_imports_on_the_fly { | 110 | if !ctx.config.enable_imports_on_the_fly { |
111 | return None; | 111 | return None; |
112 | } | 112 | } |
113 | if ctx.use_item_syntax.is_some() | 113 | if ctx.use_item_syntax.is_some() || ctx.is_path_disallowed() { |
114 | || ctx.attribute_under_caret.is_some() | ||
115 | || ctx.mod_declaration_under_caret.is_some() | ||
116 | || ctx.record_lit_syntax.is_some() | ||
117 | || ctx.has_trait_parent | ||
118 | || ctx.has_impl_parent | ||
119 | { | ||
120 | return None; | 114 | return None; |
121 | } | 115 | } |
122 | let potential_import_name = { | 116 | let potential_import_name = { |