]> git.lizzy.rs Git - rust.git/blob - tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.rs
Auto merge of #10073 - xFrednet:changelog-1-66, r=Alexendoo
[rust.git] / tests / ui-toml / allow_mixed_uninlined_format_args / uninlined_format_args.rs
1 // run-rustfix
2 #![warn(clippy::uninlined_format_args)]
3
4 fn main() {
5     let local_i32 = 1;
6     let local_f64 = 2.0;
7     let local_opt: Option<i32> = Some(3);
8
9     println!("val='{}'", local_i32);
10     println!("Hello {} is {:.*}", "x", local_i32, local_f64);
11     println!("Hello {} is {:.*}", local_i32, 5, local_f64);
12     println!("Hello {} is {2:.*}", local_i32, 5, local_f64);
13     println!("{}, {}", local_i32, local_opt.unwrap());
14 }