2021-10-21 06:11:36 -05:00
|
|
|
error: `format!` in `println!` args
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/format_args_unfixable.rs:26:5
|
2021-10-21 06:11:36 -05:00
|
|
|
|
|
|
|
|
LL | println!("error: {}", format!("something failed at {}", Location::caller()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: combine the `format!(..)` arguments with the outer `println!(..)` call
|
|
|
|
= help: or consider changing `format!` to `format_args!`
|
2022-09-22 11:04:22 -05:00
|
|
|
= note: `-D clippy::format-in-format-args` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::format_in_format_args)]`
|
2021-10-21 06:11:36 -05:00
|
|
|
|
|
|
|
error: `format!` in `println!` args
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/format_args_unfixable.rs:28:5
|
2021-10-21 06:11:36 -05:00
|
|
|
|
|
|
|
|
LL | println!("{}: {}", error, format!("something failed at {}", Location::caller()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: combine the `format!(..)` arguments with the outer `println!(..)` call
|
|
|
|
= help: or consider changing `format!` to `format_args!`
|
|
|
|
|
|
|
|
error: `format!` in `println!` args
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/format_args_unfixable.rs:30:5
|
2021-10-21 06:11:36 -05:00
|
|
|
|
|
|
|
|
LL | println!("{:?}: {}", error, format!("something failed at {}", Location::caller()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: combine the `format!(..)` arguments with the outer `println!(..)` call
|
|
|
|
= help: or consider changing `format!` to `format_args!`
|
|
|
|
|
|
|
|
error: `format!` in `println!` args
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/format_args_unfixable.rs:32:5
|
2021-10-21 06:11:36 -05:00
|
|
|
|
|
|
|
|
LL | println!("{{}}: {}", format!("something failed at {}", Location::caller()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: combine the `format!(..)` arguments with the outer `println!(..)` call
|
|
|
|
= help: or consider changing `format!` to `format_args!`
|
|
|
|
|
|
|
|
error: `format!` in `println!` args
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/format_args_unfixable.rs:34:5
|
2021-10-21 06:11:36 -05:00
|
|
|
|
|
|
|
|
LL | println!(r#"error: "{}""#, format!("something failed at {}", Location::caller()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: combine the `format!(..)` arguments with the outer `println!(..)` call
|
|
|
|
= help: or consider changing `format!` to `format_args!`
|
|
|
|
|
|
|
|
error: `format!` in `println!` args
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/format_args_unfixable.rs:36:5
|
2021-10-21 06:11:36 -05:00
|
|
|
|
|
|
|
|
LL | println!("error: {}", format!(r#"something failed at "{}""#, Location::caller()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: combine the `format!(..)` arguments with the outer `println!(..)` call
|
|
|
|
= help: or consider changing `format!` to `format_args!`
|
|
|
|
|
|
|
|
error: `format!` in `println!` args
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/format_args_unfixable.rs:38:5
|
2021-10-21 06:11:36 -05:00
|
|
|
|
|
|
|
|
LL | println!("error: {}", format!("something failed at {} {0}", Location::caller()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: combine the `format!(..)` arguments with the outer `println!(..)` call
|
|
|
|
= help: or consider changing `format!` to `format_args!`
|
|
|
|
|
|
|
|
error: `format!` in `format!` args
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/format_args_unfixable.rs:40:13
|
2021-10-21 06:11:36 -05:00
|
|
|
|
|
|
|
|
LL | let _ = format!("error: {}", format!("something failed at {}", Location::caller()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: combine the `format!(..)` arguments with the outer `format!(..)` call
|
|
|
|
= help: or consider changing `format!` to `format_args!`
|
|
|
|
|
|
|
|
error: `format!` in `write!` args
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/format_args_unfixable.rs:42:13
|
2021-10-21 06:11:36 -05:00
|
|
|
|
|
|
|
|
LL | let _ = write!(
|
|
|
|
| _____________^
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2021-10-21 06:11:36 -05:00
|
|
|
LL | | stdout(),
|
|
|
|
LL | | "error: {}",
|
|
|
|
LL | | format!("something failed at {}", Location::caller())
|
|
|
|
LL | | );
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= help: combine the `format!(..)` arguments with the outer `write!(..)` call
|
|
|
|
= help: or consider changing `format!` to `format_args!`
|
|
|
|
|
|
|
|
error: `format!` in `writeln!` args
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/format_args_unfixable.rs:48:13
|
2021-10-21 06:11:36 -05:00
|
|
|
|
|
|
|
|
LL | let _ = writeln!(
|
|
|
|
| _____________^
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2021-10-21 06:11:36 -05:00
|
|
|
LL | | stdout(),
|
|
|
|
LL | | "error: {}",
|
|
|
|
LL | | format!("something failed at {}", Location::caller())
|
|
|
|
LL | | );
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= help: combine the `format!(..)` arguments with the outer `writeln!(..)` call
|
|
|
|
= help: or consider changing `format!` to `format_args!`
|
|
|
|
|
|
|
|
error: `format!` in `print!` args
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/format_args_unfixable.rs:54:5
|
2021-10-21 06:11:36 -05:00
|
|
|
|
|
|
|
|
LL | print!("error: {}", format!("something failed at {}", Location::caller()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: combine the `format!(..)` arguments with the outer `print!(..)` call
|
|
|
|
= help: or consider changing `format!` to `format_args!`
|
|
|
|
|
|
|
|
error: `format!` in `eprint!` args
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/format_args_unfixable.rs:56:5
|
2021-10-21 06:11:36 -05:00
|
|
|
|
|
|
|
|
LL | eprint!("error: {}", format!("something failed at {}", Location::caller()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: combine the `format!(..)` arguments with the outer `eprint!(..)` call
|
|
|
|
= help: or consider changing `format!` to `format_args!`
|
|
|
|
|
|
|
|
error: `format!` in `eprintln!` args
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/format_args_unfixable.rs:58:5
|
2021-10-21 06:11:36 -05:00
|
|
|
|
|
|
|
|
LL | eprintln!("error: {}", format!("something failed at {}", Location::caller()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: combine the `format!(..)` arguments with the outer `eprintln!(..)` call
|
|
|
|
= help: or consider changing `format!` to `format_args!`
|
|
|
|
|
|
|
|
error: `format!` in `format_args!` args
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/format_args_unfixable.rs:60:13
|
2021-10-21 06:11:36 -05:00
|
|
|
|
|
|
|
|
LL | let _ = format_args!("error: {}", format!("something failed at {}", Location::caller()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: combine the `format!(..)` arguments with the outer `format_args!(..)` call
|
|
|
|
= help: or consider changing `format!` to `format_args!`
|
|
|
|
|
|
|
|
error: `format!` in `assert!` args
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/format_args_unfixable.rs:62:5
|
2021-10-21 06:11:36 -05:00
|
|
|
|
|
|
|
|
LL | assert!(true, "error: {}", format!("something failed at {}", Location::caller()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: combine the `format!(..)` arguments with the outer `assert!(..)` call
|
|
|
|
= help: or consider changing `format!` to `format_args!`
|
|
|
|
|
|
|
|
error: `format!` in `assert_eq!` args
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/format_args_unfixable.rs:64:5
|
2021-10-21 06:11:36 -05:00
|
|
|
|
|
|
|
|
LL | assert_eq!(0, 0, "error: {}", format!("something failed at {}", Location::caller()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: combine the `format!(..)` arguments with the outer `assert_eq!(..)` call
|
|
|
|
= help: or consider changing `format!` to `format_args!`
|
|
|
|
|
|
|
|
error: `format!` in `assert_ne!` args
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/format_args_unfixable.rs:66:5
|
2021-10-21 06:11:36 -05:00
|
|
|
|
|
|
|
|
LL | assert_ne!(0, 0, "error: {}", format!("something failed at {}", Location::caller()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: combine the `format!(..)` arguments with the outer `assert_ne!(..)` call
|
|
|
|
= help: or consider changing `format!` to `format_args!`
|
|
|
|
|
|
|
|
error: `format!` in `panic!` args
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/format_args_unfixable.rs:68:5
|
2021-10-21 06:11:36 -05:00
|
|
|
|
|
|
|
|
LL | panic!("error: {}", format!("something failed at {}", Location::caller()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: combine the `format!(..)` arguments with the outer `panic!(..)` call
|
|
|
|
= help: or consider changing `format!` to `format_args!`
|
|
|
|
|
|
|
|
error: aborting due to 18 previous errors
|
|
|
|
|