We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
semicolon_if_nothing_returned
1 parent e8861c8 commit a003ca6Copy full SHA for a003ca6
clippy_lints/src/semicolon_if_nothing_returned.rs
@@ -44,7 +44,7 @@ impl LateLintPass<'_> for SemicolonIfNothingReturned {
44
let t_expr = cx.typeck_results().expr_ty(expr);
45
if t_expr.is_unit();
46
if let snippet = snippet_with_macro_callsite(cx, expr.span, "}");
47
- if !snippet.ends_with('}');
+ if !snippet.ends_with('}') && !snippet.ends_with(';');
48
if cx.sess().source_map().is_multiline(block.span);
49
then {
50
// filter out the desugared `for` loop
0 commit comments