Skip to content

Commit db1b698

Browse files
committed
Rust: Accept fixed spurious results
1 parent 5417277 commit db1b698

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

rust/ql/test/query-tests/unusedentities/CONSISTENCY/DataFlowConsistency.expected

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ uniqueCallEnclosingCallable
218218
| unreachable.rs:294:13:294:32 | CallExpr | Call should have one enclosing callable but has 0. |
219219
| unreachable.rs:296:9:296:22 | CallExpr | Call should have one enclosing callable but has 0. |
220220
| unreachable.rs:301:13:301:32 | CallExpr | Call should have one enclosing callable but has 0. |
221+
| unreachable.rs:306:5:306:18 | CallExpr | Call should have one enclosing callable but has 0. |
222+
| unreachable.rs:308:5:308:18 | CallExpr | Call should have one enclosing callable but has 0. |
223+
| unreachable.rs:310:5:310:18 | CallExpr | Call should have one enclosing callable but has 0. |
221224
| unreachable.rs:318:22:318:41 | CallExpr | Call should have one enclosing callable but has 0. |
222225
| unreachable.rs:319:9:319:22 | CallExpr | Call should have one enclosing callable but has 0. |
223226
| unreachable.rs:322:9:322:22 | CallExpr | Call should have one enclosing callable but has 0. |

rust/ql/test/query-tests/unusedentities/UnusedValue.expected

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,3 @@
1818
| more.rs:44:9:44:14 | a_ptr4 | Variable $@ is assigned a value that is never used. | more.rs:44:9:44:14 | a_ptr4 | a_ptr4 |
1919
| more.rs:59:9:59:13 | d_ptr | Variable $@ is assigned a value that is never used. | more.rs:59:9:59:13 | d_ptr | d_ptr |
2020
| more.rs:65:9:65:17 | f_ptr | Variable $@ is assigned a value that is never used. | more.rs:65:13:65:17 | f_ptr | f_ptr |
21-
| unreachable.rs:292:9:292:15 | for_ten | Variable $@ is assigned a value that is never used. | unreachable.rs:292:9:292:15 | for_ten | for_ten |
22-
| unreachable.rs:299:9:299:16 | for_ever | Variable $@ is assigned a value that is never used. | unreachable.rs:299:9:299:16 | for_ever | for_ever |

rust/ql/test/query-tests/unusedentities/unreachable.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,14 +289,14 @@ pub fn unreachable_loop() {
289289
async fn do_something_async() {}
290290

291291
pub async fn unreachable_loop_async() {
292-
let for_ten = async { // $ SPURIOUS: Alert[rust/unused-value]
292+
let for_ten = async {
293293
for _ in 1..10 {
294294
do_something_async().await;
295295
}
296296
do_something();
297297
};
298298

299-
let for_ever = async { // $ SPURIOUS: Alert[rust/unused-value]
299+
let for_ever = async {
300300
loop {
301301
do_something_async().await;
302302
}

0 commit comments

Comments
 (0)