fix(rustc_parse): incorrect span information for macro block expr
Old error output: = note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) help: wrap this expression in parentheses | 4 | break '_l $f(;) | ^ ^ New error output: = note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) help: wrap this expression in parentheses | 4 | break '_l ($f); | ^ ^
This commit is contained in:
@@ -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