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:
commit
7696aca55f
5 changed files with 64 additions and 2 deletions
|
@ -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(),
|
||||
));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue