aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/completions
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_completion/src/completions')
-rw-r--r--crates/ide_completion/src/completions/keyword.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ide_completion/src/completions/keyword.rs b/crates/ide_completion/src/completions/keyword.rs
index 2c42438d6..0bfdf9603 100644
--- a/crates/ide_completion/src/completions/keyword.rs
+++ b/crates/ide_completion/src/completions/keyword.rs
@@ -75,7 +75,9 @@ pub(crate) fn complete_expr_keyword(acc: &mut Completions, ctx: &CompletionConte
75 return; 75 return;
76 } 76 }
77 77
78 if expects_item || ctx.expects_non_trait_assoc_item() || ctx.expect_record_field() { 78 if !ctx.has_visibility_prev_sibling()
79 && (expects_item || ctx.expects_non_trait_assoc_item() || ctx.expect_record_field())
80 {
79 add_keyword("pub(crate)", "pub(crate) "); 81 add_keyword("pub(crate)", "pub(crate) ");
80 add_keyword("pub", "pub "); 82 add_keyword("pub", "pub ");
81 } 83 }