[semicolon_if_nothing_returned
]: enable the autofix
This commit is contained in:
parent
1d33469658
commit
eaccc6d38f
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user