Rust: Clean up the test (it turns out a nested UnusedVariable.qlref is not needed) and accept consistency check changes.

This commit is contained in:
Geoffrey White
2025-03-10 17:17:42 +00:00
parent bb39955a24
commit 7717f92ec6
4 changed files with 4 additions and 8 deletions

View File

@@ -1,4 +1,2 @@
extractionWarning
| main.rs:512:5:512:28 | macro expansion failed: could not resolve macro 'undefined_macro_call' |
| main.rs:516:5:516:28 | macro expansion failed: could not resolve macro 'undefined_macro_call' |
| main.rs:522:13:522:36 | macro expansion failed: could not resolve macro 'undefined_macro_call' |
| undefined_macros/main.rs:1:1:1:1 | semantic analyzer unavailable (not included as a module) |

View File

@@ -1,2 +0,0 @@
query: queries/unusedentities/UnusedVariable.ql
postprocess: utils/test/InlineExpectationsTestQuery.ql

View File

@@ -2,19 +2,19 @@
// --- undefined macro calls ---
fn undefined_macros1() {
let d: u16 = 4;
let a: u16;
undefined_macro_call!(d);
}
fn undefined_macros2() {
{
let a: u16 = 6; // $ MISSING: Alert[rust/unused-variable]
let a: u16 = 1; // $ MISSING: Alert[rust/unused-value]
}
undefined_macro_call!(5);
let b: u16 = 6; // $ MISSING: Alert[rust/unused-variable]
let b: u16; // $ MISSING: Alert[rust/unused-variable]
}
fn undefined_macros3() {