Fix the bug of next_point in span
This commit is contained in:
@@ -2172,7 +2172,7 @@ impl<'a> Parser<'a> {
|
||||
},
|
||||
ExprKind::Block(_, None) => {
|
||||
self.sess.emit_err(IfExpressionMissingCondition {
|
||||
if_span: self.sess.source_map().next_point(lo),
|
||||
if_span: lo.shrink_to_hi(),
|
||||
block_span: self.sess.source_map().start_point(cond_span),
|
||||
});
|
||||
std::mem::replace(&mut cond, this.mk_expr_err(cond_span.shrink_to_hi()))
|
||||
|
||||
Reference in New Issue
Block a user