mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 13:43:17 +00:00
23 lines
357 B
Rust
23 lines
357 B
Rust
// run-rustfix
|
|
// edition:2021
|
|
|
|
#![warn(clippy::uninlined_format_args)]
|
|
|
|
fn main() {
|
|
let var = 1;
|
|
|
|
println!("val='{}'", var);
|
|
|
|
if var > 0 {
|
|
panic!("p1 {}", var);
|
|
}
|
|
if var > 0 {
|
|
panic!("p2 {0}", var);
|
|
}
|
|
if var > 0 {
|
|
panic!("p3 {var}", var = var);
|
|
}
|
|
if var > 0 {
|
|
panic!("p4 {var}");
|
|
}
|
|
}
|