1 error: `to_string` applied to a type that implements `Display` in `format!` args
2 --> $DIR/format_args.rs:74:72
4 LL | let _ = format!("error: something failed at {}", Location::caller().to_string());
5 | ^^^^^^^^^^^^ help: remove this
7 = note: `-D clippy::to-string-in-format-args` implied by `-D warnings`
9 error: `to_string` applied to a type that implements `Display` in `write!` args
10 --> $DIR/format_args.rs:78:27
12 LL | Location::caller().to_string()
13 | ^^^^^^^^^^^^ help: remove this
15 error: `to_string` applied to a type that implements `Display` in `writeln!` args
16 --> $DIR/format_args.rs:83:27
18 LL | Location::caller().to_string()
19 | ^^^^^^^^^^^^ help: remove this
21 error: `to_string` applied to a type that implements `Display` in `print!` args
22 --> $DIR/format_args.rs:85:63
24 LL | print!("error: something failed at {}", Location::caller().to_string());
25 | ^^^^^^^^^^^^ help: remove this
27 error: `to_string` applied to a type that implements `Display` in `println!` args
28 --> $DIR/format_args.rs:86:65
30 LL | println!("error: something failed at {}", Location::caller().to_string());
31 | ^^^^^^^^^^^^ help: remove this
33 error: `to_string` applied to a type that implements `Display` in `eprint!` args
34 --> $DIR/format_args.rs:87:64
36 LL | eprint!("error: something failed at {}", Location::caller().to_string());
37 | ^^^^^^^^^^^^ help: remove this
39 error: `to_string` applied to a type that implements `Display` in `eprintln!` args
40 --> $DIR/format_args.rs:88:66
42 LL | eprintln!("error: something failed at {}", Location::caller().to_string());
43 | ^^^^^^^^^^^^ help: remove this
45 error: `to_string` applied to a type that implements `Display` in `format_args!` args
46 --> $DIR/format_args.rs:89:77
48 LL | let _ = format_args!("error: something failed at {}", Location::caller().to_string());
49 | ^^^^^^^^^^^^ help: remove this
51 error: `to_string` applied to a type that implements `Display` in `assert!` args
52 --> $DIR/format_args.rs:90:70
54 LL | assert!(true, "error: something failed at {}", Location::caller().to_string());
55 | ^^^^^^^^^^^^ help: remove this
57 error: `to_string` applied to a type that implements `Display` in `assert_eq!` args
58 --> $DIR/format_args.rs:91:73
60 LL | assert_eq!(0, 0, "error: something failed at {}", Location::caller().to_string());
61 | ^^^^^^^^^^^^ help: remove this
63 error: `to_string` applied to a type that implements `Display` in `assert_ne!` args
64 --> $DIR/format_args.rs:92:73
66 LL | assert_ne!(0, 0, "error: something failed at {}", Location::caller().to_string());
67 | ^^^^^^^^^^^^ help: remove this
69 error: `to_string` applied to a type that implements `Display` in `panic!` args
70 --> $DIR/format_args.rs:93:63
72 LL | panic!("error: something failed at {}", Location::caller().to_string());
73 | ^^^^^^^^^^^^ help: remove this
75 error: `to_string` applied to a type that implements `Display` in `println!` args
76 --> $DIR/format_args.rs:94:20
78 LL | println!("{}", X(1).to_string());
79 | ^^^^^^^^^^^^^^^^ help: use this: `*X(1)`
81 error: `to_string` applied to a type that implements `Display` in `println!` args
82 --> $DIR/format_args.rs:95:20
84 LL | println!("{}", Y(&X(1)).to_string());
85 | ^^^^^^^^^^^^^^^^^^^^ help: use this: `***Y(&X(1))`
87 error: `to_string` applied to a type that implements `Display` in `println!` args
88 --> $DIR/format_args.rs:96:24
90 LL | println!("{}", Z(1).to_string());
91 | ^^^^^^^^^^^^ help: remove this
93 error: `to_string` applied to a type that implements `Display` in `println!` args
94 --> $DIR/format_args.rs:97:20
96 LL | println!("{}", x.to_string());
97 | ^^^^^^^^^^^^^ help: use this: `**x`
99 error: `to_string` applied to a type that implements `Display` in `println!` args
100 --> $DIR/format_args.rs:98:20
102 LL | println!("{}", x_ref.to_string());
103 | ^^^^^^^^^^^^^^^^^ help: use this: `***x_ref`
105 error: `to_string` applied to a type that implements `Display` in `println!` args
106 --> $DIR/format_args.rs:100:39
108 LL | println!("{foo}{bar}", foo = "foo".to_string(), bar = "bar");
109 | ^^^^^^^^^^^^ help: remove this
111 error: `to_string` applied to a type that implements `Display` in `println!` args
112 --> $DIR/format_args.rs:101:52
114 LL | println!("{foo}{bar}", foo = "foo", bar = "bar".to_string());
115 | ^^^^^^^^^^^^ help: remove this
117 error: `to_string` applied to a type that implements `Display` in `println!` args
118 --> $DIR/format_args.rs:102:39
120 LL | println!("{foo}{bar}", bar = "bar".to_string(), foo = "foo");
121 | ^^^^^^^^^^^^ help: remove this
123 error: `to_string` applied to a type that implements `Display` in `println!` args
124 --> $DIR/format_args.rs:103:52
126 LL | println!("{foo}{bar}", bar = "bar", foo = "foo".to_string());
127 | ^^^^^^^^^^^^ help: remove this
129 error: aborting due to 21 previous errors