2022-10-23 13:18:45 +00:00
|
|
|
error: variables can be used directly in the `format!` string
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/uninlined_format_args_panic.rs:10:5
|
2022-10-23 13:18:45 +00:00
|
|
|
|
|
|
|
|
LL | println!("val='{}'", var);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::uninlined-format-args` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::uninlined_format_args)]`
|
2022-10-23 13:18:45 +00:00
|
|
|
help: change this to
|
|
|
|
|
|
|
|
|
LL - println!("val='{}'", var);
|
|
|
|
LL + println!("val='{var}'");
|
|
|
|
|
|
|
|
|
|
|
|
|
error: variables can be used directly in the `format!` string
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/uninlined_format_args_panic.rs:13:9
|
2022-10-23 13:18:45 +00:00
|
|
|
|
|
|
|
|
LL | panic!("p1 {}", var);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: change this to
|
|
|
|
|
|
|
|
|
LL - panic!("p1 {}", var);
|
|
|
|
LL + panic!("p1 {var}");
|
|
|
|
|
|
|
|
|
|
|
|
|
error: variables can be used directly in the `format!` string
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/uninlined_format_args_panic.rs:16:9
|
2022-10-23 13:18:45 +00:00
|
|
|
|
|
|
|
|
LL | panic!("p2 {0}", var);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: change this to
|
|
|
|
|
|
|
|
|
LL - panic!("p2 {0}", var);
|
|
|
|
LL + panic!("p2 {var}");
|
|
|
|
|
|
|
|
|
|
|
|
|
error: variables can be used directly in the `format!` string
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/uninlined_format_args_panic.rs:19:9
|
2022-10-23 13:18:45 +00:00
|
|
|
|
|
|
|
|
LL | panic!("p3 {var}", var = var);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: change this to
|
|
|
|
|
|
|
|
|
LL - panic!("p3 {var}", var = var);
|
|
|
|
LL + panic!("p3 {var}");
|
|
|
|
|
|
|
|
|
|
2022-12-17 13:12:54 +00:00
|
|
|
error: variables can be used directly in the `format!` string
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/uninlined_format_args_panic.rs:29:5
|
2022-12-17 13:12:54 +00:00
|
|
|
|
|
|
|
|
LL | assert!(var == 1, "p5 {}", var);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: change this to
|
|
|
|
|
|
|
|
|
LL - assert!(var == 1, "p5 {}", var);
|
|
|
|
LL + assert!(var == 1, "p5 {var}");
|
|
|
|
|
|
|
|
|
|
|
|
|
error: variables can be used directly in the `format!` string
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/uninlined_format_args_panic.rs:30:5
|
2022-12-17 13:12:54 +00:00
|
|
|
|
|
|
|
|
LL | debug_assert!(var == 1, "p6 {}", var);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: change this to
|
|
|
|
|
|
|
|
|
LL - debug_assert!(var == 1, "p6 {}", var);
|
|
|
|
LL + debug_assert!(var == 1, "p6 {var}");
|
|
|
|
|
|
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
2022-10-23 13:18:45 +00:00
|
|
|
|