mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-17 05:25:37 +03:00
[semicolon_if_nothing_returned]: enable the autofix
This commit is contained in:
@@ -43,7 +43,7 @@ fn check_block(&mut self, cx: &LateContext<'tcx>, block: &'tcx Block<'tcx>) {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user