RS.CLIPPY.SEMICOLON_INSIDE_BLOCK
Add a semicolon inside the block
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: semicolon_inside_block. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Suggests moving the semicolon after a block to the inside of the block, after its last expression.
Why restrict this?
For consistency it's best to have the semicolon inside/outside the block. Either way is fine
and this lint suggests inside the block.
Take a look at semicolon_outside_block for the other alternative.
Example
unsafe { f(x) };
Use instead:
unsafe { f(x); }
Configuration
-
semicolon-inside-block-ignore-singleline: Whether to lint only if it's multiline.(default:
false)