File tree Expand file tree Collapse file tree
rust/downgrades/109496fd2f20f28a35e50b110859e74882ee80d6 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ private predicate metaTokenTree(Element id, Element tokenTree) {
3939 token_tree_meta_token_trees ( id , tokenTree )
4040}
4141
42- private predicate deletedElement ( Element id ) {
42+ private predicate deletedAstNode ( Element id ) {
4343 wrapperConstArg ( id ) or
4444 unsafeInnerMeta ( id ) or
4545 cfg_atoms ( id ) or
@@ -48,6 +48,12 @@ private predicate deletedElement(Element id) {
4848 try_block_modifiers ( id )
4949}
5050
51+ private predicate deletedElement ( Element id ) {
52+ deletedAstNode ( id )
53+ or
54+ exists ( Element parent , string text | comments ( id , parent , text ) and deletedAstNode ( parent ) )
55+ }
56+
5157query predicate new_block_expr_is_try ( Element id ) {
5258 exists ( Element modifier | block_expr_try_block_modifiers ( id , modifier ) and try_block_modifier_is_try ( modifier ) )
5359}
@@ -69,7 +75,7 @@ query predicate new_const_arg_exprs(Element id, Element expr) {
6975}
7076
7177query predicate new_comments ( Element id , Element parent , string text ) {
72- comments ( id , parent , text ) and not deletedElement ( parent )
78+ comments ( id , parent , text ) and not deletedAstNode ( parent )
7379}
7480
7581query predicate new_struct_field_defaults ( Element id , Element expr ) {
You can’t perform that action at this time.
0 commit comments