1
1
error: `to_string` applied to a type that implements `Display` in `format!` args
2
- --> $DIR/format_args.rs:76 :72
2
+ --> $DIR/format_args.rs:77 :72
3
3
|
4
4
LL | let _ = format!("error: something failed at {}", Location::caller().to_string());
5
5
| ^^^^^^^^^^^^ help: remove this
@@ -8,145 +8,145 @@ LL | let _ = format!("error: something failed at {}", Location::caller().to_
8
8
= help: to override `-D warnings` add `#[allow(clippy::to_string_in_format_args)]`
9
9
10
10
error: `to_string` applied to a type that implements `Display` in `write!` args
11
- --> $DIR/format_args.rs:80 :27
11
+ --> $DIR/format_args.rs:81 :27
12
12
|
13
13
LL | Location::caller().to_string()
14
14
| ^^^^^^^^^^^^ help: remove this
15
15
16
16
error: `to_string` applied to a type that implements `Display` in `writeln!` args
17
- --> $DIR/format_args.rs:85 :27
17
+ --> $DIR/format_args.rs:86 :27
18
18
|
19
19
LL | Location::caller().to_string()
20
20
| ^^^^^^^^^^^^ help: remove this
21
21
22
22
error: `to_string` applied to a type that implements `Display` in `print!` args
23
- --> $DIR/format_args.rs:87 :63
23
+ --> $DIR/format_args.rs:88 :63
24
24
|
25
25
LL | print!("error: something failed at {}", Location::caller().to_string());
26
26
| ^^^^^^^^^^^^ help: remove this
27
27
28
28
error: `to_string` applied to a type that implements `Display` in `println!` args
29
- --> $DIR/format_args.rs:88 :65
29
+ --> $DIR/format_args.rs:89 :65
30
30
|
31
31
LL | println!("error: something failed at {}", Location::caller().to_string());
32
32
| ^^^^^^^^^^^^ help: remove this
33
33
34
34
error: `to_string` applied to a type that implements `Display` in `eprint!` args
35
- --> $DIR/format_args.rs:89 :64
35
+ --> $DIR/format_args.rs:90 :64
36
36
|
37
37
LL | eprint!("error: something failed at {}", Location::caller().to_string());
38
38
| ^^^^^^^^^^^^ help: remove this
39
39
40
40
error: `to_string` applied to a type that implements `Display` in `eprintln!` args
41
- --> $DIR/format_args.rs:90 :66
41
+ --> $DIR/format_args.rs:91 :66
42
42
|
43
43
LL | eprintln!("error: something failed at {}", Location::caller().to_string());
44
44
| ^^^^^^^^^^^^ help: remove this
45
45
46
46
error: `to_string` applied to a type that implements `Display` in `format_args!` args
47
- --> $DIR/format_args.rs:91 :77
47
+ --> $DIR/format_args.rs:92 :77
48
48
|
49
49
LL | let _ = format_args!("error: something failed at {}", Location::caller().to_string());
50
50
| ^^^^^^^^^^^^ help: remove this
51
51
52
52
error: `to_string` applied to a type that implements `Display` in `assert!` args
53
- --> $DIR/format_args.rs:92 :70
53
+ --> $DIR/format_args.rs:93 :70
54
54
|
55
55
LL | assert!(true, "error: something failed at {}", Location::caller().to_string());
56
56
| ^^^^^^^^^^^^ help: remove this
57
57
58
58
error: `to_string` applied to a type that implements `Display` in `assert_eq!` args
59
- --> $DIR/format_args.rs:93 :73
59
+ --> $DIR/format_args.rs:94 :73
60
60
|
61
61
LL | assert_eq!(0, 0, "error: something failed at {}", Location::caller().to_string());
62
62
| ^^^^^^^^^^^^ help: remove this
63
63
64
64
error: `to_string` applied to a type that implements `Display` in `assert_ne!` args
65
- --> $DIR/format_args.rs:94 :73
65
+ --> $DIR/format_args.rs:95 :73
66
66
|
67
67
LL | assert_ne!(0, 0, "error: something failed at {}", Location::caller().to_string());
68
68
| ^^^^^^^^^^^^ help: remove this
69
69
70
70
error: `to_string` applied to a type that implements `Display` in `panic!` args
71
- --> $DIR/format_args.rs:95 :63
71
+ --> $DIR/format_args.rs:96 :63
72
72
|
73
73
LL | panic!("error: something failed at {}", Location::caller().to_string());
74
74
| ^^^^^^^^^^^^ help: remove this
75
75
76
76
error: `to_string` applied to a type that implements `Display` in `println!` args
77
- --> $DIR/format_args.rs:96 :20
77
+ --> $DIR/format_args.rs:97 :20
78
78
|
79
79
LL | println!("{}", X(1).to_string());
80
80
| ^^^^^^^^^^^^^^^^ help: use this: `*X(1)`
81
81
82
82
error: `to_string` applied to a type that implements `Display` in `println!` args
83
- --> $DIR/format_args.rs:97 :20
83
+ --> $DIR/format_args.rs:98 :20
84
84
|
85
85
LL | println!("{}", Y(&X(1)).to_string());
86
86
| ^^^^^^^^^^^^^^^^^^^^ help: use this: `***Y(&X(1))`
87
87
88
88
error: `to_string` applied to a type that implements `Display` in `println!` args
89
- --> $DIR/format_args.rs:98 :24
89
+ --> $DIR/format_args.rs:99 :24
90
90
|
91
91
LL | println!("{}", Z(1).to_string());
92
92
| ^^^^^^^^^^^^ help: remove this
93
93
94
94
error: `to_string` applied to a type that implements `Display` in `println!` args
95
- --> $DIR/format_args.rs:99 :20
95
+ --> $DIR/format_args.rs:100 :20
96
96
|
97
97
LL | println!("{}", x.to_string());
98
98
| ^^^^^^^^^^^^^ help: use this: `**x`
99
99
100
100
error: `to_string` applied to a type that implements `Display` in `println!` args
101
- --> $DIR/format_args.rs:100 :20
101
+ --> $DIR/format_args.rs:101 :20
102
102
|
103
103
LL | println!("{}", x_ref.to_string());
104
104
| ^^^^^^^^^^^^^^^^^ help: use this: `***x_ref`
105
105
106
106
error: `to_string` applied to a type that implements `Display` in `println!` args
107
- --> $DIR/format_args.rs:102 :39
107
+ --> $DIR/format_args.rs:103 :39
108
108
|
109
109
LL | println!("{foo}{bar}", foo = "foo".to_string(), bar = "bar");
110
110
| ^^^^^^^^^^^^ help: remove this
111
111
112
112
error: `to_string` applied to a type that implements `Display` in `println!` args
113
- --> $DIR/format_args.rs:103 :52
113
+ --> $DIR/format_args.rs:104 :52
114
114
|
115
115
LL | println!("{foo}{bar}", foo = "foo", bar = "bar".to_string());
116
116
| ^^^^^^^^^^^^ help: remove this
117
117
118
118
error: `to_string` applied to a type that implements `Display` in `println!` args
119
- --> $DIR/format_args.rs:104 :39
119
+ --> $DIR/format_args.rs:105 :39
120
120
|
121
121
LL | println!("{foo}{bar}", bar = "bar".to_string(), foo = "foo");
122
122
| ^^^^^^^^^^^^ help: remove this
123
123
124
124
error: `to_string` applied to a type that implements `Display` in `println!` args
125
- --> $DIR/format_args.rs:105 :52
125
+ --> $DIR/format_args.rs:106 :52
126
126
|
127
127
LL | println!("{foo}{bar}", bar = "bar", foo = "foo".to_string());
128
128
| ^^^^^^^^^^^^ help: remove this
129
129
130
130
error: `to_string` applied to a type that implements `Display` in `print!` args
131
- --> $DIR/format_args.rs:117 :37
131
+ --> $DIR/format_args.rs:118 :37
132
132
|
133
133
LL | print!("{}", (Location::caller().to_string()));
134
134
| ^^^^^^^^^^^^ help: remove this
135
135
136
136
error: `to_string` applied to a type that implements `Display` in `print!` args
137
- --> $DIR/format_args.rs:118 :39
137
+ --> $DIR/format_args.rs:119 :39
138
138
|
139
139
LL | print!("{}", ((Location::caller()).to_string()));
140
140
| ^^^^^^^^^^^^ help: remove this
141
141
142
142
error: `to_string` applied to a type that implements `Display` in `format!` args
143
- --> $DIR/format_args.rs:146 :38
143
+ --> $DIR/format_args.rs:147 :38
144
144
|
145
145
LL | let x = format!("{} {}", a, b.to_string());
146
146
| ^^^^^^^^^^^^ help: remove this
147
147
148
148
error: `to_string` applied to a type that implements `Display` in `println!` args
149
- --> $DIR/format_args.rs:160 :24
149
+ --> $DIR/format_args.rs:161 :24
150
150
|
151
151
LL | println!("{}", original[..10].to_string());
152
152
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use this: `&original[..10]`
0 commit comments