File tree 2 files changed +0
-18
lines changed
crates/ide-completion/src
2 files changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -383,7 +383,6 @@ impl<'a> CompletionContext<'a> {
383
383
// FIXME: This shouldn't exist
384
384
pub ( crate ) fn is_path_disallowed ( & self ) -> bool {
385
385
!self . qualifier_ctx . none ( )
386
- || matches ! ( self . prev_sibling, Some ( ImmediatePrevSibling :: Visibility ) )
387
386
|| ( matches ! ( self . name_ctx( ) , Some ( NameContext { .. } ) ) && self . pattern_ctx . is_none ( ) )
388
387
|| matches ! ( self . pattern_ctx, Some ( PatternContext { record_pat: Some ( _) , .. } ) )
389
388
|| matches ! (
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ pub(crate) enum ImmediatePrevSibling {
23
23
IfExpr ,
24
24
TraitDefName ,
25
25
ImplDefType ,
26
- Visibility ,
27
26
}
28
27
29
28
#[ derive( Clone , Debug , PartialEq , Eq ) ]
@@ -77,17 +76,6 @@ pub(crate) fn determine_prev_sibling(name_like: &ast::NameLike) -> Option<Immedi
77
76
_ => node,
78
77
} ;
79
78
let prev_sibling = non_trivia_sibling ( node. into ( ) , Direction :: Prev ) ?. into_node ( ) ?;
80
- if prev_sibling. kind ( ) == ERROR {
81
- let prev_sibling = prev_sibling. first_child ( ) ?;
82
- let res = match_ast ! {
83
- match prev_sibling {
84
- // vis followed by random ident will always error the parser
85
- ast:: Visibility ( _) => ImmediatePrevSibling :: Visibility ,
86
- _ => return None ,
87
- }
88
- } ;
89
- return Some ( res) ;
90
- }
91
79
let res = match_ast ! {
92
80
match prev_sibling {
93
81
ast:: ExprStmt ( it) => {
@@ -442,9 +430,4 @@ mod tests {
442
430
check_prev_sibling ( r"fn foo() { if true {} w$0" , ImmediatePrevSibling :: IfExpr ) ;
443
431
check_prev_sibling ( r"fn foo() { if true {}; w$0" , None ) ;
444
432
}
445
-
446
- #[ test]
447
- fn test_vis_prev_sibling ( ) {
448
- check_prev_sibling ( r"pub w$0" , ImmediatePrevSibling :: Visibility ) ;
449
- }
450
433
}
You can’t perform that action at this time.
0 commit comments