diff --git a/rust/ql/test/query-tests/unusedentities/UnusedVariable.expected b/rust/ql/test/query-tests/unusedentities/UnusedVariable.expected index 58a47494907d2..42baff65e1684 100644 --- a/rust/ql/test/query-tests/unusedentities/UnusedVariable.expected +++ b/rust/ql/test/query-tests/unusedentities/UnusedVariable.expected @@ -2,8 +2,6 @@ | main.rs:90:13:90:13 | d | Variable is not used. | | main.rs:141:5:141:5 | y | Variable is not used. | | main.rs:168:9:168:9 | x | Variable is not used. | -| main.rs:196:9:196:9 | x | Variable is not used. | -| main.rs:201:9:201:9 | x | Variable is not used. | | main.rs:250:17:250:17 | a | Variable is not used. | | main.rs:258:20:258:22 | val | Variable is not used. | | main.rs:272:14:272:16 | val | Variable is not used. | diff --git a/rust/ql/test/query-tests/unusedentities/main.rs b/rust/ql/test/query-tests/unusedentities/main.rs index c56bac83b0888..3bb78d49dc9de 100644 --- a/rust/ql/test/query-tests/unusedentities/main.rs +++ b/rust/ql/test/query-tests/unusedentities/main.rs @@ -193,12 +193,12 @@ fn loops() { } } - for x // SPURIOUS: unused variable + for x in 1..10 { println!("x is {x}"); } - for x // SPURIOUS: unused variable + for x in 1..10 { _ = format!("x is {x}"); // SPURIOUS: unused value `res` }