Skip to content

Commit 3d49eff

Browse files
committed
Rust: Add integration test for pub extern crate resolution
1 parent 8acfc7f commit 3d49eff

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

rust/ql/integration-tests/hello-workspace/exe/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ mod a_module;
77
fn main() {
88
my_macro2!(); // $ item=my_macro2
99
hello(); // $ item=HELLO
10+
lib::extern_crate_alias::a_module::hello(); // $ item=HELLO
1011
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| exe/src/main.rs:7:1:10:1 | fn main |
1+
| exe/src/main.rs:7:1:11:1 | fn main |
22
| lib/src/a_module/mod.rs:1:1:4:1 | fn hello |

rust/ql/integration-tests/hello-workspace/lib/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ mod macros {
1515
}
1616

1717
pub mod a_module;
18+
19+
pub extern crate self as extern_crate_alias;

rust/ql/integration-tests/hello-workspace/summary.cargo.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
| Inconsistencies - Path resolution | 0 |
1010
| Inconsistencies - SSA | 0 |
1111
| Inconsistencies - data flow | 0 |
12-
| Lines of code extracted | 21 |
13-
| Lines of user code extracted | 21 |
12+
| Lines of code extracted | 23 |
13+
| Lines of user code extracted | 23 |
1414
| Macro calls - resolved | 10 |
1515
| Macro calls - total | 10 |
1616
| Macro calls - unresolved | 0 |

rust/ql/integration-tests/hello-workspace/summary.rust-project.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
| Inconsistencies - Path resolution | 0 |
1010
| Inconsistencies - SSA | 0 |
1111
| Inconsistencies - data flow | 0 |
12-
| Lines of code extracted | 21 |
13-
| Lines of user code extracted | 21 |
12+
| Lines of code extracted | 23 |
13+
| Lines of user code extracted | 23 |
1414
| Macro calls - resolved | 10 |
1515
| Macro calls - total | 10 |
1616
| Macro calls - unresolved | 0 |

0 commit comments

Comments
 (0)