@@ -79,7 +79,7 @@ fn add_keywords(acc: &mut Completions, ctx: &CompletionContext<'_>, kind: Option
7979 let in_trait = matches ! ( kind, Some ( ItemListKind :: Trait ) ) ;
8080 let in_trait_impl = matches ! ( kind, Some ( ItemListKind :: TraitImpl ( _) ) ) ;
8181 let in_inherent_impl = matches ! ( kind, Some ( ItemListKind :: Impl ) ) ;
82- let no_qualifiers = ctx. qualifier_ctx . vis_node . is_none ( ) ;
82+ let no_vis_qualifiers = ctx. qualifier_ctx . vis_node . is_none ( ) ;
8383 let in_block = kind. is_none ( ) ;
8484
8585 if !in_trait_impl {
@@ -89,7 +89,7 @@ fn add_keywords(acc: &mut Completions, ctx: &CompletionContext<'_>, kind: Option
8989 }
9090 if in_item_list {
9191 add_keyword ( "trait" , "trait $1 {\n $0\n }" ) ;
92- if no_qualifiers {
92+ if no_vis_qualifiers {
9393 add_keyword ( "impl" , "impl $1 {\n $0\n }" ) ;
9494 }
9595 }
@@ -104,15 +104,15 @@ fn add_keywords(acc: &mut Completions, ctx: &CompletionContext<'_>, kind: Option
104104 add_keyword ( "trait" , "trait $1 {\n $0\n }" ) ;
105105 add_keyword ( "union" , "union $1 {\n $0\n }" ) ;
106106 add_keyword ( "use" , "use $0" ) ;
107- if no_qualifiers {
107+ if no_vis_qualifiers {
108108 add_keyword ( "impl" , "impl $1 {\n $0\n }" ) ;
109109 }
110110 }
111111
112- if !in_trait && !in_block && no_qualifiers {
113- add_keyword ( "pub(crate)" , "pub(crate)" ) ;
114- add_keyword ( "pub(super)" , "pub(super)" ) ;
115- add_keyword ( "pub" , "pub" ) ;
112+ if !in_trait && !in_block && no_vis_qualifiers {
113+ add_keyword ( "pub(crate)" , "pub(crate) $0 " ) ;
114+ add_keyword ( "pub(super)" , "pub(super) $0 " ) ;
115+ add_keyword ( "pub" , "pub $0 " ) ;
116116 }
117117
118118 if in_extern_block {
@@ -126,7 +126,7 @@ fn add_keywords(acc: &mut Completions, ctx: &CompletionContext<'_>, kind: Option
126126 }
127127
128128 add_keyword ( "fn" , "fn $1($2) {\n $0\n }" ) ;
129- add_keyword ( "unsafe" , "unsafe" ) ;
129+ add_keyword ( "unsafe" , "unsafe $0 " ) ;
130130 add_keyword ( "const" , "const $0" ) ;
131131 }
132132 }
0 commit comments