fix(rustc_parse): incorrect span information for macro path expr
Old error output: 3 | let _: usize = $f; | ----- ^ expected `usize`, found struct `Baz` | | | expected due to this New error output: 3 | let _: usize = $f; | ----- ^^ expected `usize`, found struct `Baz` | | | expected due to this
This commit is contained in:
parent
d562848268
commit
f7c0566b12
3 changed files with 28 additions and 1 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(),
|
||||
));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue