Skip to content

Commit 9db38bc

Browse files
committed
Rust: Update path resolution tests
1 parent d37787c commit 9db38bc

File tree

3 files changed

+266
-262
lines changed

3 files changed

+266
-262
lines changed

rust/ql/test/library-tests/path-resolution/main.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ fn i() {
7575

7676
{
7777
struct Foo {
78-
x: i32,
78+
x: i32, // $ MISSING: item=i32
7979
} // I30
8080

8181
let _ = Foo { x: 0 }; // $ item=I30
@@ -121,9 +121,13 @@ mod m6 {
121121

122122
mod m7 {
123123
pub enum MyEnum {
124-
A(i32), // I42
125-
B { x: i32 }, // I43
126-
C, // I44
124+
A(
125+
i32, // $ MISSING: item=i32
126+
), // I42
127+
B {
128+
x: i32, // $ MISSING: item=i32
129+
}, // I43
130+
C, // I44
127131
} // I41
128132

129133
#[rustfmt::skip]

rust/ql/test/library-tests/path-resolution/my.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ type Result<
2525
>; // my::Result
2626

2727
fn int_div(
28-
x: i32, //
29-
y: i32,
30-
) -> Result<i32> // $ item=my::Result
28+
x: i32, // $ MISSING: item=i32
29+
y: i32, // $ MISSING: item=i32
30+
) -> Result<i32> // $ item=my::Result $ MISSING: item=i32
3131
{
3232
if y == 0 {
3333
return Err("Div by zero".to_string());

0 commit comments

Comments
 (0)