Skip to content

Commit

Permalink
Merge pull request #17744 from geoffw0/unusedvar5
Browse files Browse the repository at this point in the history
Rust: Unused variable follow-up work
  • Loading branch information
geoffw0 authored Oct 14, 2024
2 parents 5115216 + c4256f2 commit 25b592f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rust/ql/test/query-tests/unusedentities/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ fn arrays() {

println!("lets use {:?}", js);

for k // SPURIOUS: unused variable [macros not yet supported]
for k
in ks
{
println!("lets use {}", k); // [unreachable FALSE POSITIVE]
Expand Down Expand Up @@ -166,12 +166,12 @@ fn loops() {

for _ in 1..10 {}

for x // SPURIOUS: unused variable [macros not yet supported]
for x
in 1..10 {
println!("x is {}", x);
}

for x // SPURIOUS: unused variable [macros not yet supported]
for x
in 1..10 {
assert!(x != 11);
}
Expand Down

0 comments on commit 25b592f

Please sign in to comment.