Rollup merge of #107487 - edward-shen:edward-shen/107213-round-2, r=estebank
Make the "extra if in let...else block" hint a suggestion Changes the hint to a suggestion, suggested in #107213. r? ```@estebank```
This commit is contained in:
@@ -2290,7 +2290,7 @@ impl<'a> Parser<'a> {
|
||||
block
|
||||
} else {
|
||||
let let_else_sub = matches!(cond.kind, ExprKind::Let(..))
|
||||
.then(|| IfExpressionLetSomeSub { if_span: lo });
|
||||
.then(|| IfExpressionLetSomeSub { if_span: lo.until(cond_span) });
|
||||
|
||||
self.sess.emit_err(IfExpressionMissingThenBlock {
|
||||
if_span: lo,
|
||||
|
||||
Reference in New Issue
Block a user