@@ -18,8 +18,8 @@ use crate::{
1818 patterns:: {
1919 fn_is_prev, for_is_prev2, has_bind_pat_parent, has_block_expr_parent,
2020 has_field_list_parent, has_impl_as_prev_sibling, has_impl_parent,
21- has_impl_trait_parent , has_item_list_or_source_file_parent, has_ref_parent,
22- has_trait_as_prev_sibling , has_trait_parent, if_is_prev, is_in_loop_body, is_match_arm,
21+ has_item_list_or_source_file_parent, has_ref_parent, has_trait_as_prev_sibling ,
22+ has_trait_parent, if_is_prev, inside_impl_trait_block , is_in_loop_body, is_match_arm,
2323 unsafe_is_prev,
2424 } ,
2525 CompletionConfig ,
@@ -87,7 +87,7 @@ pub(crate) struct CompletionContext<'a> {
8787 pub ( super ) in_loop_body : bool ,
8888 pub ( super ) has_trait_parent : bool ,
8989 pub ( super ) has_impl_parent : bool ,
90- pub ( super ) has_impl_trait_parent : bool ,
90+ pub ( super ) inside_impl_trait_block : bool ,
9191 pub ( super ) has_field_list_parent : bool ,
9292 pub ( super ) trait_as_prev_sibling : bool ,
9393 pub ( super ) impl_as_prev_sibling : bool ,
@@ -172,7 +172,7 @@ impl<'a> CompletionContext<'a> {
172172 block_expr_parent : false ,
173173 has_trait_parent : false ,
174174 has_impl_parent : false ,
175- has_impl_trait_parent : false ,
175+ inside_impl_trait_block : false ,
176176 has_field_list_parent : false ,
177177 trait_as_prev_sibling : false ,
178178 impl_as_prev_sibling : false ,
@@ -234,7 +234,7 @@ impl<'a> CompletionContext<'a> {
234234 /// Exception for this case is `impl Trait for Foo`, where we would like to hint trait method names.
235235 /// - `for _ i<|>` -- obviously, it'll be "in" keyword.
236236 pub ( crate ) fn no_completion_required ( & self ) -> bool {
237- ( self . fn_is_prev && !self . has_impl_trait_parent ) || self . for_is_prev2
237+ ( self . fn_is_prev && !self . inside_impl_trait_block ) || self . for_is_prev2
238238 }
239239
240240 /// The range of the identifier that is being completed.
@@ -260,7 +260,7 @@ impl<'a> CompletionContext<'a> {
260260 self . in_loop_body = is_in_loop_body ( syntax_element. clone ( ) ) ;
261261 self . has_trait_parent = has_trait_parent ( syntax_element. clone ( ) ) ;
262262 self . has_impl_parent = has_impl_parent ( syntax_element. clone ( ) ) ;
263- self . has_impl_trait_parent = has_impl_trait_parent ( syntax_element. clone ( ) ) ;
263+ self . inside_impl_trait_block = inside_impl_trait_block ( syntax_element. clone ( ) ) ;
264264 self . has_field_list_parent = has_field_list_parent ( syntax_element. clone ( ) ) ;
265265 self . impl_as_prev_sibling = has_impl_as_prev_sibling ( syntax_element. clone ( ) ) ;
266266 self . trait_as_prev_sibling = has_trait_as_prev_sibling ( syntax_element. clone ( ) ) ;
0 commit comments