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:
@@ -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(),
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user