Rollup merge of #88450 - notriddle:notriddle/maybe_whole_expr, r=cjgillot
fix(rustc_parse): correct span in `maybe_whole_expr!` Fixes #87812
This commit is contained in:
@@ -41,7 +41,7 @@ macro_rules! maybe_whole_expr {
|
||||
let path = path.clone();
|
||||
$p.bump();
|
||||
return Ok($p.mk_expr(
|
||||
$p.token.span,
|
||||
$p.prev_token.span,
|
||||
ExprKind::Path(None, path),
|
||||
AttrVec::new(),
|
||||
));
|
||||
@@ -50,7 +50,7 @@ macro_rules! maybe_whole_expr {
|
||||
let block = block.clone();
|
||||
$p.bump();
|
||||
return Ok($p.mk_expr(
|
||||
$p.token.span,
|
||||
$p.prev_token.span,
|
||||
ExprKind::Block(block, None),
|
||||
AttrVec::new(),
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user