1
1
warning: panic message contains a brace
2
- --> $DIR/non-fmt-panic.rs:11 :29
2
+ --> $DIR/non-fmt-panic.rs:13 :29
3
3
|
4
4
LL | panic!("here's a brace: {");
5
5
| ^
@@ -12,7 +12,7 @@ LL | panic!("{}", "here's a brace: {");
12
12
| +++++
13
13
14
14
warning: panic message contains a brace
15
- --> $DIR/non-fmt-panic.rs:12 :31
15
+ --> $DIR/non-fmt-panic.rs:14 :31
16
16
|
17
17
LL | std::panic!("another one: }");
18
18
| ^
@@ -24,7 +24,7 @@ LL | std::panic!("{}", "another one: }");
24
24
| +++++
25
25
26
26
warning: panic message contains an unused formatting placeholder
27
- --> $DIR/non-fmt-panic.rs:13 :25
27
+ --> $DIR/non-fmt-panic.rs:15 :25
28
28
|
29
29
LL | core::panic!("Hello {}");
30
30
| ^^
@@ -40,7 +40,7 @@ LL | core::panic!("{}", "Hello {}");
40
40
| +++++
41
41
42
42
warning: panic message contains unused formatting placeholders
43
- --> $DIR/non-fmt-panic.rs:14 :21
43
+ --> $DIR/non-fmt-panic.rs:16 :21
44
44
|
45
45
LL | assert!(false, "{:03x} {test} bla");
46
46
| ^^^^^^ ^^^^^^
@@ -56,7 +56,7 @@ LL | assert!(false, "{}", "{:03x} {test} bla");
56
56
| +++++
57
57
58
58
warning: panic message is not a string literal
59
- --> $DIR/non-fmt-panic.rs:16 :20
59
+ --> $DIR/non-fmt-panic.rs:18 :20
60
60
|
61
61
LL | assert!(false, S);
62
62
| ^
@@ -69,7 +69,7 @@ LL | assert!(false, "{}", S);
69
69
| +++++
70
70
71
71
warning: panic message contains braces
72
- --> $DIR/non-fmt-panic.rs:18 :27
72
+ --> $DIR/non-fmt-panic.rs:20 :27
73
73
|
74
74
LL | debug_assert!(false, "{{}} bla");
75
75
| ^^^^
@@ -81,7 +81,7 @@ LL | debug_assert!(false, "{}", "{{}} bla");
81
81
| +++++
82
82
83
83
warning: panic message is not a string literal
84
- --> $DIR/non-fmt-panic.rs:19 :12
84
+ --> $DIR/non-fmt-panic.rs:21 :12
85
85
|
86
86
LL | panic!(C);
87
87
| ^
@@ -92,13 +92,9 @@ help: add a "{}" format string to Display the message
92
92
|
93
93
LL | panic!("{}", C);
94
94
| +++++
95
- help: or use std::panic::panic_any instead
96
- |
97
- LL | std::panic::panic_any(C);
98
- | ~~~~~~~~~~~~~~~~~~~~~
99
95
100
96
warning: panic message is not a string literal
101
- --> $DIR/non-fmt-panic.rs:20 :12
97
+ --> $DIR/non-fmt-panic.rs:22 :12
102
98
|
103
99
LL | panic!(S);
104
100
| ^
@@ -109,13 +105,9 @@ help: add a "{}" format string to Display the message
109
105
|
110
106
LL | panic!("{}", S);
111
107
| +++++
112
- help: or use std::panic::panic_any instead
113
- |
114
- LL | std::panic::panic_any(S);
115
- | ~~~~~~~~~~~~~~~~~~~~~
116
108
117
109
warning: panic message is not a string literal
118
- --> $DIR/non-fmt-panic.rs:21 :17
110
+ --> $DIR/non-fmt-panic.rs:23 :17
119
111
|
120
112
LL | std::panic!(123);
121
113
| ^^^
@@ -132,7 +124,7 @@ LL | std::panic::panic_any(123);
132
124
| ~~~~~~~~~~~~~~~~~~~~~
133
125
134
126
warning: panic message is not a string literal
135
- --> $DIR/non-fmt-panic.rs:22 :18
127
+ --> $DIR/non-fmt-panic.rs:24 :18
136
128
|
137
129
LL | core::panic!(&*"abc");
138
130
| ^^^^^^^
@@ -145,7 +137,7 @@ LL | core::panic!("{}", &*"abc");
145
137
| +++++
146
138
147
139
warning: panic message contains an unused formatting placeholder
148
- --> $DIR/non-fmt-panic.rs:23 :12
140
+ --> $DIR/non-fmt-panic.rs:25 :12
149
141
|
150
142
LL | panic!(concat!("{", "}"));
151
143
| ^^^^^^^^^^^^^^^^^
@@ -161,7 +153,7 @@ LL | panic!("{}", concat!("{", "}"));
161
153
| +++++
162
154
163
155
warning: panic message contains braces
164
- --> $DIR/non-fmt-panic.rs:24 :5
156
+ --> $DIR/non-fmt-panic.rs:26 :5
165
157
|
166
158
LL | panic!(concat!("{", "{"));
167
159
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -173,15 +165,15 @@ LL | panic!("{}", concat!("{", "{"));
173
165
| +++++
174
166
175
167
warning: panic message contains an unused formatting placeholder
176
- --> $DIR/non-fmt-panic.rs:26 :37
168
+ --> $DIR/non-fmt-panic.rs:28 :37
177
169
|
178
170
LL | fancy_panic::fancy_panic!("test {} 123");
179
171
| ^^
180
172
|
181
173
= note: this message is not used as a format string when given without arguments, but will be in Rust 2021
182
174
183
175
warning: panic message is not a string literal
184
- --> $DIR/non-fmt-panic.rs:36 :12
176
+ --> $DIR/non-fmt-panic.rs:38 :12
185
177
|
186
178
LL | panic!(a!());
187
179
| ^^^^
@@ -198,7 +190,7 @@ LL | std::panic::panic_any(a!());
198
190
| ~~~~~~~~~~~~~~~~~~~~~
199
191
200
192
warning: panic message is not a string literal
201
- --> $DIR/non-fmt-panic.rs:38 :12
193
+ --> $DIR/non-fmt-panic.rs:40 :12
202
194
|
203
195
LL | panic!(format!("{}", 1));
204
196
| ^^^^^^^^^^^^^^^^
@@ -213,7 +205,7 @@ LL + panic!("{}", 1);
213
205
|
214
206
215
207
warning: panic message is not a string literal
216
- --> $DIR/non-fmt-panic.rs:39 :20
208
+ --> $DIR/non-fmt-panic.rs:41 :20
217
209
|
218
210
LL | assert!(false, format!("{}", 1));
219
211
| ^^^^^^^^^^^^^^^^
@@ -228,7 +220,7 @@ LL + assert!(false, "{}", 1);
228
220
|
229
221
230
222
warning: panic message is not a string literal
231
- --> $DIR/non-fmt-panic.rs:40 :26
223
+ --> $DIR/non-fmt-panic.rs:42 :26
232
224
|
233
225
LL | debug_assert!(false, format!("{}", 1));
234
226
| ^^^^^^^^^^^^^^^^
@@ -243,7 +235,7 @@ LL + debug_assert!(false, "{}", 1);
243
235
|
244
236
245
237
warning: panic message is not a string literal
246
- --> $DIR/non-fmt-panic.rs:42 :12
238
+ --> $DIR/non-fmt-panic.rs:44 :12
247
239
|
248
240
LL | panic![123];
249
241
| ^^^
@@ -260,7 +252,7 @@ LL | std::panic::panic_any(123);
260
252
| ~~~~~~~~~~~~~~~~~~~~~~ ~
261
253
262
254
warning: panic message is not a string literal
263
- --> $DIR/non-fmt-panic.rs:43 :12
255
+ --> $DIR/non-fmt-panic.rs:45 :12
264
256
|
265
257
LL | panic!{123};
266
258
| ^^^
0 commit comments