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(
675
675
{
676
676
if let Some ( item) = ast:: Item :: cast ( n) {
677
677
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 ( ) ,
679
679
ast:: Item :: Enum ( it) => it. variant_list ( ) . is_none ( ) ,
680
680
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 ( ) ,
682
682
ast:: Item :: Impl ( it) => it. assoc_item_list ( ) . is_none ( ) ,
683
683
ast:: Item :: Module ( it) => {
684
684
it. item_list ( ) . is_none ( ) && it. semicolon_token ( ) . is_none ( )
@@ -688,7 +688,7 @@ fn classify_name_ref(
688
688
it. field_list ( ) . is_none ( ) && it. semicolon_token ( ) . is_none ( )
689
689
}
690
690
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 ( ) ,
692
692
ast:: Item :: Union ( it) => it. record_field_list ( ) . is_none ( ) ,
693
693
_ => false ,
694
694
} ;
You can’t perform that action at this time.
0 commit comments