Skip to content

Commit 1e30585

Browse files
committed
Rust: Accept changes to expected files
1 parent d88cfe9 commit 1e30585

File tree

9 files changed

+39
-39
lines changed

9 files changed

+39
-39
lines changed

rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ getBody
99
getName
1010
| gen_macro_def.rs:4:5:9:5 | MacroDef | gen_macro_def.rs:7:15:7:24 | vec_of_two |
1111
getVisibility
12-
| gen_macro_def.rs:4:5:9:5 | MacroDef | gen_macro_def.rs:7:5:7:7 | Visibility |
12+
| gen_macro_def.rs:4:5:9:5 | MacroDef | gen_macro_def.rs:7:5:7:7 | pub |

rust/ql/test/extractor-tests/generated/Module/Module.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ getName
1111
| gen_module.rs:5:1:7:1 | mod bar | gen_module.rs:5:5:5:7 | bar |
1212
| lib.rs:1:1:1:19 | mod gen_module | lib.rs:1:9:1:18 | gen_module |
1313
getVisibility
14-
| lib.rs:1:1:1:19 | mod gen_module | lib.rs:1:1:1:3 | Visibility |
14+
| lib.rs:1:1:1:19 | mod gen_module | lib.rs:1:1:1:3 | pub |
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
instances
2-
| gen_struct_field.rs:7:16:7:21 | StructField | isUnsafe: | no |
2+
| gen_struct_field.rs:7:16:7:21 | x: i32 | isUnsafe: | no |
33
getAttr
44
getDefault
55
getName
6-
| gen_struct_field.rs:7:16:7:21 | StructField | gen_struct_field.rs:7:16:7:16 | x |
6+
| gen_struct_field.rs:7:16:7:21 | x: i32 | gen_struct_field.rs:7:16:7:16 | x |
77
getTypeRepr
8-
| gen_struct_field.rs:7:16:7:21 | StructField | gen_struct_field.rs:7:19:7:21 | i32 |
8+
| gen_struct_field.rs:7:16:7:21 | x: i32 | gen_struct_field.rs:7:19:7:21 | i32 |
99
getVisibility
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
instances
22
| gen_struct_field_list.rs:7:14:7:31 | StructFieldList |
33
getField
4-
| gen_struct_field_list.rs:7:14:7:31 | StructFieldList | 0 | gen_struct_field_list.rs:7:16:7:21 | StructField |
5-
| gen_struct_field_list.rs:7:14:7:31 | StructFieldList | 1 | gen_struct_field_list.rs:7:24:7:29 | StructField |
4+
| gen_struct_field_list.rs:7:14:7:31 | StructFieldList | 0 | gen_struct_field_list.rs:7:16:7:21 | x: i32 |
5+
| gen_struct_field_list.rs:7:14:7:31 | StructFieldList | 1 | gen_struct_field_list.rs:7:24:7:29 | y: i32 |

rust/ql/test/extractor-tests/generated/Trait/Trait.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ getName
1313
| gen_trait.rs:10:1:10:57 | trait Foo | gen_trait.rs:10:11:10:13 | Foo |
1414
getTypeBoundList
1515
getVisibility
16-
| gen_trait.rs:10:1:10:57 | trait Foo | gen_trait.rs:10:1:10:3 | Visibility |
16+
| gen_trait.rs:10:1:10:57 | trait Foo | gen_trait.rs:10:1:10:3 | pub |
1717
getWhereClause
1818
| gen_trait.rs:10:1:10:57 | trait Foo | gen_trait.rs:10:32:10:54 | WhereClause |
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
instances
2-
| gen_visibility.rs:7:7:7:9 | Visibility |
3-
| lib.rs:1:1:1:3 | Visibility |
2+
| gen_visibility.rs:7:7:7:9 | pub |
3+
| lib.rs:1:1:1:3 | pub |
44
getPath

rust/ql/test/extractor-tests/macro-expansion/PrintAst.expected

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ lib.rs:
146146
# 1| [SourceFile] SourceFile
147147
# 1| getItem(0): [Module] mod call
148148
# 1| getName(): [Name] call
149-
# 1| getVisibility(): [Visibility] Visibility
149+
# 1| getVisibility(): [Visibility] pub
150150
# 2| getItem(1): [Module] mod macro_expansion
151151
# 2| getName(): [Name] macro_expansion
152-
# 2| getVisibility(): [Visibility] Visibility
152+
# 2| getVisibility(): [Visibility] pub
153153
macro_expansion.rs:
154154
# 1| [SourceFile] SourceFile
155155
# 1| getItem(0): [Use] use proc_macro::{...}
@@ -223,7 +223,7 @@ macro_expansion.rs:
223223
# 11| getSegment(): [PathSegment] inner_1
224224
# 11| getIdentifier(): [NameRef] inner_1
225225
# 4| getName(): [Name] foo
226-
# 4| getVisibility(): [Visibility] Visibility
226+
# 4| getVisibility(): [Visibility] pub
227227
# 4| getItem(1): [Function] fn foo_new
228228
# 4| getParamList(): [ParamList] ParamList
229229
# 4| getFunctionBody(): [BlockExpr] { ... }
@@ -271,7 +271,7 @@ macro_expansion.rs:
271271
# 11| getSegment(): [PathSegment] inner_1
272272
# 11| getIdentifier(): [NameRef] inner_1
273273
# 4| getName(): [Name] foo_new
274-
# 4| getVisibility(): [Visibility] Visibility
274+
# 4| getVisibility(): [Visibility] pub
275275
# 3| getAttr(0): [Attr] Attr
276276
# 3| getMeta(): [Meta] Meta
277277
# 3| getPath(): [Path] add_one
@@ -286,13 +286,13 @@ macro_expansion.rs:
286286
# 16| getFunctionBody(): [BlockExpr] { ... }
287287
# 16| getStmtList(): [StmtList] StmtList
288288
# 16| getName(): [Name] bar_0
289-
# 16| getVisibility(): [Visibility] Visibility
289+
# 16| getVisibility(): [Visibility] pub
290290
# 16| getItem(1): [Function] fn bar_0_new
291291
# 16| getParamList(): [ParamList] ParamList
292292
# 16| getFunctionBody(): [BlockExpr] { ... }
293293
# 16| getStmtList(): [StmtList] StmtList
294294
# 16| getName(): [Name] bar_0_new
295-
# 16| getVisibility(): [Visibility] Visibility
295+
# 16| getVisibility(): [Visibility] pub
296296
# 15| getAttr(0): [Attr] Attr
297297
# 15| getMeta(): [Meta] Meta
298298
# 15| getPath(): [Path] add_one
@@ -305,13 +305,13 @@ macro_expansion.rs:
305305
# 16| getFunctionBody(): [BlockExpr] { ... }
306306
# 16| getStmtList(): [StmtList] StmtList
307307
# 16| getName(): [Name] bar_1
308-
# 16| getVisibility(): [Visibility] Visibility
308+
# 16| getVisibility(): [Visibility] pub
309309
# 16| getItem(1): [Function] fn bar_1_new
310310
# 16| getParamList(): [ParamList] ParamList
311311
# 16| getFunctionBody(): [BlockExpr] { ... }
312312
# 16| getStmtList(): [StmtList] StmtList
313313
# 16| getName(): [Name] bar_1_new
314-
# 16| getVisibility(): [Visibility] Visibility
314+
# 16| getVisibility(): [Visibility] pub
315315
# 15| getAttr(0): [Attr] Attr
316316
# 15| getMeta(): [Meta] Meta
317317
# 15| getPath(): [Path] add_one
@@ -340,7 +340,7 @@ macro_expansion.rs:
340340
# 22| getTokenTree(): [TokenTree] TokenTree
341341
# 28| getItem(5): [Struct] struct S
342342
# 28| getName(): [Name] S
343-
# 28| getVisibility(): [Visibility] Visibility
343+
# 28| getVisibility(): [Visibility] pub
344344
# 30| getItem(6): [Impl] impl S { ... }
345345
# 30| getAssocItemList(): [AssocItemList] AssocItemList
346346
# 31| getAssocItem(0): [Function] (item with attribute macro expansion)
@@ -392,7 +392,7 @@ macro_expansion.rs:
392392
# 31| getSegment(): [PathSegment] _print
393393
# 31| getIdentifier(): [NameRef] _print
394394
# 32| getName(): [Name] bzz_0
395-
# 32| getVisibility(): [Visibility] Visibility
395+
# 32| getVisibility(): [Visibility] pub
396396
# 32| getItem(1): [Function] fn bzz_1
397397
# 32| getParamList(): [ParamList] ParamList
398398
# 32| getFunctionBody(): [BlockExpr] { ... }
@@ -440,7 +440,7 @@ macro_expansion.rs:
440440
# 31| getSegment(): [PathSegment] _print
441441
# 31| getIdentifier(): [NameRef] _print
442442
# 32| getName(): [Name] bzz_1
443-
# 32| getVisibility(): [Visibility] Visibility
443+
# 32| getVisibility(): [Visibility] pub
444444
# 32| getItem(2): [Function] fn bzz_2
445445
# 32| getParamList(): [ParamList] ParamList
446446
# 32| getFunctionBody(): [BlockExpr] { ... }
@@ -488,7 +488,7 @@ macro_expansion.rs:
488488
# 31| getSegment(): [PathSegment] _print
489489
# 31| getIdentifier(): [NameRef] _print
490490
# 32| getName(): [Name] bzz_2
491-
# 32| getVisibility(): [Visibility] Visibility
491+
# 32| getVisibility(): [Visibility] pub
492492
# 31| getAttr(0): [Attr] Attr
493493
# 31| getMeta(): [Meta] Meta
494494
# 31| getPath(): [Path] repeat
@@ -515,7 +515,7 @@ macro_expansion.rs:
515515
# 44| getFunctionBody(): [BlockExpr] { ... }
516516
# 44| getStmtList(): [StmtList] StmtList
517517
# 44| getName(): [Name] x
518-
# 44| getVisibility(): [Visibility] Visibility
518+
# 44| getVisibility(): [Visibility] pub
519519
# 43| getSelfTy(): [PathTypeRepr] S
520520
# 43| getPath(): [Path] S
521521
# 43| getSegment(): [PathSegment] S
@@ -700,7 +700,7 @@ macro_expansion.rs:
700700
# 76| getIdentifier(): [NameRef] i32
701701
# 78| getItem(16): [Struct] struct MyStruct
702702
# 78| getFieldList(): [StructFieldList] StructFieldList
703-
# 79| getField(0): [StructField] StructField
703+
# 79| getField(0): [StructField] field: ...
704704
# 79| getName(): [Name] field
705705
# 79| getTypeRepr(): [MacroTypeRepr] MacroTypeRepr
706706
# 79| getMacroCall(): [MacroCall] my_int!...
@@ -809,7 +809,7 @@ macro_expansion.rs:
809809
# 83| getIdentifier(): [NameRef] derive
810810
# 83| getTokenTree(): [TokenTree] TokenTree
811811
# 84| getFieldList(): [StructFieldList] StructFieldList
812-
# 85| getField(0): [StructField] StructField
812+
# 85| getField(0): [StructField] field: usize
813813
# 85| getName(): [Name] field
814814
# 85| getTypeRepr(): [PathTypeRepr] usize
815815
# 85| getPath(): [Path] usize
@@ -990,13 +990,13 @@ macro_expansion.rs:
990990
# 98| getTokenTree(): [TokenTree] TokenTree
991991
# 99| getName(): [Name] MyDeriveUnion
992992
# 99| getStructFieldList(): [StructFieldList] StructFieldList
993-
# 100| getField(0): [StructField] StructField
993+
# 100| getField(0): [StructField] field1: usize
994994
# 100| getName(): [Name] field1
995995
# 100| getTypeRepr(): [PathTypeRepr] usize
996996
# 100| getPath(): [Path] usize
997997
# 100| getSegment(): [PathSegment] usize
998998
# 100| getIdentifier(): [NameRef] usize
999-
# 101| getField(1): [StructField] StructField
999+
# 101| getField(1): [StructField] field2: f64
10001000
# 101| getName(): [Name] field2
10011001
# 101| getTypeRepr(): [PathTypeRepr] f64
10021002
# 101| getPath(): [Path] f64
@@ -2003,7 +2003,7 @@ proc_macro.rs:
20032003
# 5| getPath(): [Path] TokenStream
20042004
# 5| getSegment(): [PathSegment] TokenStream
20052005
# 5| getIdentifier(): [NameRef] TokenStream
2006-
# 5| getVisibility(): [Visibility] Visibility
2006+
# 5| getVisibility(): [Visibility] pub
20072007
# 20| getItem(3): [Function] fn add_one
20082008
# 21| getParamList(): [ParamList] ParamList
20092009
# 21| getParam(0): [Param] ...: TokenStream
@@ -2434,7 +2434,7 @@ proc_macro.rs:
24342434
# 21| getPath(): [Path] TokenStream
24352435
# 21| getSegment(): [PathSegment] TokenStream
24362436
# 21| getIdentifier(): [NameRef] TokenStream
2437-
# 21| getVisibility(): [Visibility] Visibility
2437+
# 21| getVisibility(): [Visibility] pub
24382438
# 31| getItem(4): [Function] fn erase
24392439
# 32| getParamList(): [ParamList] ParamList
24402440
# 32| getParam(0): [Param] ...: TokenStream
@@ -2473,7 +2473,7 @@ proc_macro.rs:
24732473
# 32| getPath(): [Path] TokenStream
24742474
# 32| getSegment(): [PathSegment] TokenStream
24752475
# 32| getIdentifier(): [NameRef] TokenStream
2476-
# 32| getVisibility(): [Visibility] Visibility
2476+
# 32| getVisibility(): [Visibility] pub
24772477
# 36| getItem(5): [Function] fn my_trait_derive
24782478
# 37| getParamList(): [ParamList] ParamList
24792479
# 37| getParam(0): [Param] ...: TokenStream
@@ -3808,4 +3808,4 @@ proc_macro.rs:
38083808
# 37| getPath(): [Path] TokenStream
38093809
# 37| getSegment(): [PathSegment] TokenStream
38103810
# 37| getIdentifier(): [NameRef] TokenStream
3811-
# 37| getVisibility(): [Visibility] Visibility
3811+
# 37| getVisibility(): [Visibility] pub

rust/ql/test/extractor-tests/macro-in-library/PrintAst.expected

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ lib.rs:
22
# 1| [SourceFile] SourceFile
33
# 1| getItem(0): [Module] mod macro_in_library
44
# 1| getName(): [Name] macro_in_library
5-
# 1| getVisibility(): [Visibility] Visibility
5+
# 1| getVisibility(): [Visibility] pub
66
macro_in_library.rs:
77
# 1| [SourceFile] SourceFile
88
# 1| getItem(0): [MacroCall] (item with attribute macro expansion)
99
# 2| getAttributeMacroExpansion(): [MacroItems] MacroItems
1010
# 2| getItem(0): [Function] fn foo
1111
# 2| getParamList(): [ParamList] ParamList
1212
# 2| getName(): [Name] foo
13-
# 2| getVisibility(): [Visibility] Visibility
13+
# 2| getVisibility(): [Visibility] pub
1414
# 2| getItem(1): [Function] fn foo_new
1515
# 2| getParamList(): [ParamList] ParamList
1616
# 2| getName(): [Name] foo_new
17-
# 2| getVisibility(): [Visibility] Visibility
17+
# 2| getVisibility(): [Visibility] pub
1818
# 4| getItem(1): [Function] fn bar
1919
# 4| getParamList(): [ParamList] ParamList
2020
# 4| getName(): [Name] bar
21-
# 4| getVisibility(): [Visibility] Visibility
21+
# 4| getVisibility(): [Visibility] pub
2222
proc_macro.rs:
2323
# 1| [SourceFile] SourceFile
2424
# 1| getItem(0): [Use] use ...::TokenStream
@@ -60,4 +60,4 @@ proc_macro.rs:
6060
# 5| getPath(): [Path] TokenStream
6161
# 5| getSegment(): [PathSegment] TokenStream
6262
# 5| getIdentifier(): [NameRef] TokenStream
63-
# 5| getVisibility(): [Visibility] Visibility
63+
# 5| getVisibility(): [Visibility] pub

rust/ql/test/extractor-tests/utf8/ast.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| lib.rs:1:1:1:3 | Visibility |
1+
| lib.rs:1:1:1:3 | pub |
22
| lib.rs:1:1:1:25 | SourceFile |
33
| lib.rs:1:1:1:25 | mod utf8_identifiers |
44
| lib.rs:1:9:1:24 | utf8_identifiers |
@@ -17,12 +17,12 @@
1717
| utf8_identifiers.rs:6:8:6:8 | X |
1818
| utf8_identifiers.rs:6:10:8:1 | StructFieldList |
1919
| utf8_identifiers.rs:7:5:7:5 | \u03b4 |
20-
| utf8_identifiers.rs:7:5:7:13 | StructField |
20+
| utf8_identifiers.rs:7:5:7:13 | \u03b4: usize |
2121
| utf8_identifiers.rs:7:9:7:13 | usize |
2222
| utf8_identifiers.rs:7:9:7:13 | usize |
2323
| utf8_identifiers.rs:7:9:7:13 | usize |
2424
| utf8_identifiers.rs:7:9:7:13 | usize |
25-
| utf8_identifiers.rs:10:1:10:3 | Visibility |
25+
| utf8_identifiers.rs:10:1:10:3 | pub |
2626
| utf8_identifiers.rs:10:1:12:1 | fn main |
2727
| utf8_identifiers.rs:10:8:10:11 | main |
2828
| utf8_identifiers.rs:10:12:10:13 | ParamList |

0 commit comments

Comments
 (0)