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:
commit
6390d25eab
4 changed files with 8 additions and 8 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue