This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
crates/ide-completion/src/context Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -675,10 +675,10 @@ fn classify_name_ref(
675675 {
676676 if let Some ( item) = ast:: Item :: cast ( n) {
677677 let is_inbetween = match & item {
678- ast:: Item :: Const ( it) => it. body ( ) . is_none ( ) ,
678+ ast:: Item :: Const ( it) => it. body ( ) . is_none ( ) && it . semicolon_token ( ) . is_none ( ) ,
679679 ast:: Item :: Enum ( it) => it. variant_list ( ) . is_none ( ) ,
680680 ast:: Item :: ExternBlock ( it) => it. extern_item_list ( ) . is_none ( ) ,
681- ast:: Item :: Fn ( it) => it. body ( ) . is_none ( ) ,
681+ ast:: Item :: Fn ( it) => it. body ( ) . is_none ( ) && it . semicolon_token ( ) . is_none ( ) ,
682682 ast:: Item :: Impl ( it) => it. assoc_item_list ( ) . is_none ( ) ,
683683 ast:: Item :: Module ( it) => {
684684 it. item_list ( ) . is_none ( ) && it. semicolon_token ( ) . is_none ( )
@@ -688,7 +688,7 @@ fn classify_name_ref(
688688 it. field_list ( ) . is_none ( ) && it. semicolon_token ( ) . is_none ( )
689689 }
690690 ast:: Item :: Trait ( it) => it. assoc_item_list ( ) . is_none ( ) ,
691- ast:: Item :: TypeAlias ( it) => it. ty ( ) . is_none ( ) ,
691+ ast:: Item :: TypeAlias ( it) => it. ty ( ) . is_none ( ) && it . semicolon_token ( ) . is_none ( ) ,
692692 ast:: Item :: Union ( it) => it. record_field_list ( ) . is_none ( ) ,
693693 _ => false ,
694694 } ;
You can’t perform that action at this time.
0 commit comments