Skip to content

Commit 7717f92

Browse files
committed
Rust: Clean up the test (it turns out a nested UnusedVariable.qlref is not needed) and accept consistency check changes.
1 parent bb39955 commit 7717f92

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
extractionWarning
2-
| main.rs:512:5:512:28 | macro expansion failed: could not resolve macro 'undefined_macro_call' |
3-
| main.rs:516:5:516:28 | macro expansion failed: could not resolve macro 'undefined_macro_call' |
4-
| main.rs:522:13:522:36 | macro expansion failed: could not resolve macro 'undefined_macro_call' |
2+
| undefined_macros/main.rs:1:1:1:1 | semantic analyzer unavailable (not included as a module) |

rust/ql/test/query-tests/unusedentities/undefined_macros/UnusedVariable.expected

Whitespace-only changes.

rust/ql/test/query-tests/unusedentities/undefined_macros/UnusedVariable.qlref

Lines changed: 0 additions & 2 deletions
This file was deleted.

rust/ql/test/query-tests/unusedentities/undefined_macros/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
// --- undefined macro calls ---
33

44
fn undefined_macros1() {
5-
let d: u16 = 4;
5+
let a: u16;
66

77
undefined_macro_call!(d);
88
}
99

1010
fn undefined_macros2() {
1111
{
12-
let a: u16 = 6; // $ MISSING: Alert[rust/unused-variable]
12+
let a: u16 = 1; // $ MISSING: Alert[rust/unused-value]
1313
}
1414

1515
undefined_macro_call!(5);
1616

17-
let b: u16 = 6; // $ MISSING: Alert[rust/unused-variable]
17+
let b: u16; // $ MISSING: Alert[rust/unused-variable]
1818
}
1919

2020
fn undefined_macros3() {

0 commit comments

Comments
 (0)