diff options
| author | Sylvestre Ledru <sylvestre@debian.org> | 2023-07-03 14:42:50 +0200 |
|---|---|---|
| committer | Sylvestre Ledru <sylvestre@debian.org> | 2023-07-16 19:37:42 +0200 |
| commit | eaccc6d38f356fb27bb69aa706f3862b2dc71276 (patch) | |
| tree | 3749adea4d2c9be3708194d1e52af030948e9f7d | |
| parent | 1d334696587ac22b3a9e651e7ac684ac9e0697b2 (diff) | |
| download | rust-eaccc6d38f356fb27bb69aa706f3862b2dc71276.tar.gz rust-eaccc6d38f356fb27bb69aa706f3862b2dc71276.zip | |
[`semicolon_if_nothing_returned`]: enable the autofix
| -rw-r--r-- | clippy_lints/src/semicolon_if_nothing_returned.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/semicolon_if_nothing_returned.rs b/clippy_lints/src/semicolon_if_nothing_returned.rs index 355f907e257..c9547cd95dc 100644 --- a/clippy_lints/src/semicolon_if_nothing_returned.rs +++ b/clippy_lints/src/semicolon_if_nothing_returned.rs @@ -43,7 +43,7 @@ impl<'tcx> LateLintPass<'tcx> for SemicolonIfNothingReturned { if let Some(expr) = block.expr; let t_expr = cx.typeck_results().expr_ty(expr); if t_expr.is_unit(); - let mut app = Applicability::MaybeIncorrect; + let mut app = Applicability::MachineApplicable; if let snippet = snippet_with_context(cx, expr.span, block.span.ctxt(), "}", &mut app).0; if !snippet.ends_with('}') && !snippet.ends_with(';'); if cx.sess().source_map().is_multiline(block.span); |
