I tried this code:
#[kani::proof]
fn main() {
let x = Some(1);
match x {
Some(y) => panic!("Value of y is {}", y),
None => {}
}
}
using the following command line invocation:
with Kani version : 499e35f
I expected to see this happen: No warnings about y since it's used in the panic macro.
Instead, this happened:
warning: unused variable: `y`
--> panic_arg.rs:5:14
|
5 | Some(y) => panic!("Value of y is {}", y),
| ^ help: if this is intentional, prefix it with an underscore: `_y`
|
= note: `#[warn(unused_variables)]` on by default
warning: 1 warning emitted
I tried this code:
using the following command line invocation:
with Kani version : 499e35f
I expected to see this happen: No warnings about
ysince it's used in thepanicmacro.Instead, this happened: