diff options
author | Lukas Wirth <[email protected]> | 2021-05-27 03:34:21 +0100 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-05-27 11:23:36 +0100 |
commit | f41c98342476087d0a4387e7d337ce2d897e0346 (patch) | |
tree | 1c9b8e9f5a3d26d921337f6f20501b38de6fcb94 /crates/ide_completion/src/completions/flyimport.rs | |
parent | 30948e1ecb2fb4fe35bf9c5c1e49464d4ea1d064 (diff) |
Don't complete non-macro item paths in impls and modules
Diffstat (limited to 'crates/ide_completion/src/completions/flyimport.rs')
-rw-r--r-- | crates/ide_completion/src/completions/flyimport.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ide_completion/src/completions/flyimport.rs b/crates/ide_completion/src/completions/flyimport.rs index be9cfbded..df27e7a84 100644 --- a/crates/ide_completion/src/completions/flyimport.rs +++ b/crates/ide_completion/src/completions/flyimport.rs | |||
@@ -110,7 +110,11 @@ 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() || ctx.is_path_disallowed() { | 113 | if ctx.use_item_syntax.is_some() |
114 | || ctx.is_path_disallowed() | ||
115 | || ctx.expects_item() | ||
116 | || ctx.expects_assoc_item() | ||
117 | { | ||
114 | return None; | 118 | return None; |
115 | } | 119 | } |
116 | let potential_import_name = { | 120 | let potential_import_name = { |