mirror of
https://github.com/github/codeql.git
synced 2026-04-20 06:24:03 +02:00
Rust: Add a test exposing the function scope limitation.
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
| main.rs:284:13:284:17 | total | Variable $@ is assigned a value that is never used. | main.rs:252:13:252:17 | total | total |
|
||||
| main.rs:377:9:377:9 | x | Variable $@ is assigned a value that is never used. | main.rs:377:9:377:9 | x | x |
|
||||
| main.rs:385:17:385:17 | x | Variable $@ is assigned a value that is never used. | main.rs:385:17:385:17 | x | x |
|
||||
| main.rs:550:9:550:20 | var_in_macro | Variable $@ is assigned a value that is never used. | main.rs:550:9:550:20 | var_in_macro | var_in_macro |
|
||||
| main.rs:559:9:559:9 | c | Variable $@ is assigned a value that is never used. | main.rs:559:9:559:9 | c | c |
|
||||
| main.rs:556:9:556:20 | var_in_macro | Variable $@ is assigned a value that is never used. | main.rs:556:9:556:20 | var_in_macro | var_in_macro |
|
||||
| main.rs:565:9:565:9 | c | Variable $@ is assigned a value that is never used. | main.rs:565:9:565:9 | c | c |
|
||||
| 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 |
|
||||
| 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 |
|
||||
| more.rs:65:13:65:17 | f_ptr | Variable $@ is assigned a value that is never used. | more.rs:65:13:65:17 | f_ptr | f_ptr |
|
||||
|
||||
@@ -513,7 +513,13 @@ fn macros3() {
|
||||
}
|
||||
|
||||
fn macros4() {
|
||||
{
|
||||
let a: u16 = 6; // $ MISSING: Alert[rust/unused-variable]
|
||||
}
|
||||
|
||||
undefined_macro_call!(5);
|
||||
|
||||
let b: u16 = 6; // $ MISSING: Alert[rust/unused-variable]
|
||||
}
|
||||
|
||||
fn macros5() {
|
||||
|
||||
Reference in New Issue
Block a user