File tree Expand file tree Collapse file tree 7 files changed +74
-13
lines changed
rust/ql/test/query-tests/diagnostics Expand file tree Collapse file tree 7 files changed +74
-13
lines changed Original file line number Diff line number Diff line change
1
+ | comments.rs:0:0:0:0 | comments.rs | File successfully extracted. |
1
2
| does_not_compile.rs:0:0:0:0 | does_not_compile.rs | File successfully extracted. |
2
3
| error.rs:0:0:0:0 | error.rs | File successfully extracted. |
3
4
| lib.rs:0:0:0:0 | lib.rs | File successfully extracted. |
Original file line number Diff line number Diff line change 1
- | 46 |
1
+ | 68 |
Original file line number Diff line number Diff line change 1
- | 46 |
1
+ | 68 |
Original file line number Diff line number Diff line change
1
+ | comments.rs:0:0:0:0 | comments.rs | 20 |
1
2
| my_struct.rs:0:0:0:0 | my_struct.rs | 20 |
2
- | main.rs:0:0:0:0 | main.rs | 7 |
3
+ | main.rs:0:0:0:0 | main.rs | 8 |
4
+ | lib.rs:0:0:0:0 | lib.rs | 7 |
3
5
| my_macro.rs:0:0:0:0 | my_macro.rs | 7 |
4
- | lib.rs:0:0:0:0 | lib.rs | 6 |
5
6
| does_not_compile.rs:0:0:0:0 | does_not_compile.rs | 3 |
6
7
| error.rs:0:0:0:0 | error.rs | 3 |
Original file line number Diff line number Diff line change 1
- | Elements extracted | 216 |
1
+ | Elements extracted | 290 |
2
2
| Elements unextracted | 0 |
3
- | Files extracted | 6 |
4
- | Lines of code extracted | 46 |
5
- | Lines of user code extracted | 46 |
3
+ | Files extracted | 7 |
4
+ | Lines of code extracted | 68 |
5
+ | Lines of user code extracted | 68 |
Original file line number Diff line number Diff line change
1
+ /**
2
+ * total lines in this file: 61
3
+ * of which code: 16
4
+ * of which only comments: 33
5
+ * of which blank: 12
6
+ */
7
+
8
+ // a comment
9
+
10
+ /**
11
+ * Comment attached to a struct.
12
+ */
13
+ struct StructWithComments
14
+ {
15
+ /**
16
+ * Another attached comment.
17
+ */
18
+ a : i32 ,
19
+
20
+ // And another attached comment.
21
+ b : i32 ,
22
+
23
+ /*
24
+ * And yet another attached comment.
25
+ */
26
+ c : i32 ,
27
+
28
+ // informal
29
+ // comment
30
+ // block.
31
+ cd : i32 ,
32
+
33
+ // Just a comment.
34
+ }
35
+
36
+ pub fn my_simple_func ( )
37
+ {
38
+ }
39
+
40
+ /**
41
+ * Comment attached to a function.
42
+ */
43
+ pub fn my_func_with_comments ( )
44
+ {
45
+ // comment
46
+ let a = 1 ; // comment
47
+ // comment
48
+ let b = 2 ;
49
+
50
+ // comment
51
+
52
+ /*
53
+ * Comment.
54
+ */
55
+ my_simple_func ( ) ;
56
+ }
57
+
58
+ /**
59
+ * Comment.
60
+ */
Original file line number Diff line number Diff line change 1
1
/**
2
2
* total lines in this file: 18
3
- * of which code: 7
4
- * of which only comments: 7
3
+ * of which code: 8
4
+ * of which only comments: 6
5
5
* of which blank: 4
6
6
*/
7
7
8
8
mod my_struct;
9
9
mod my_macro;
10
+ mod comments;
10
11
11
- // another comment
12
-
13
- fn main ( ) { // another comment
12
+ fn main ( ) {
14
13
println ! ( "Hello, world!" ) ;
15
14
16
15
my_struct:: my_func ( ) ;
You can’t perform that action at this time.
0 commit comments