Repository navigation
Commit e0ba7e9
Drop trailing semicolons from log macros
log_error!, log_warn!, log_info!, log_debug! and log_gossip! expanded to
a statement ending in a semicolon, unlike log_trace!. Rust 1.99 now
reports semicolon_in_expressions_from_non_local_macros for exported
macros, so downstream crates using these macros in expression position,
such as the last expression of a block or a match arm, fail to build
with -D warnings.
Expand to the bare log_given_level! expression instead. Callers in
statement position already supply their own semicolon.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Backport of 14eeba61 parent dd80b00 commit e0ba7e9
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
| 221 | + | |
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| |||
0 commit comments