fix(rustc_parse): ConstBlock expr span

This commit is contained in:
Caleb Cartwright 2020-11-07 14:33:34 -06:00
parent b2d115f6db
commit e1d5c3c054

View File

@ -873,7 +873,8 @@ impl<'a> Parser<'a> {
id: DUMMY_NODE_ID,
value: self.mk_expr(blk.span, ExprKind::Block(blk, None), AttrVec::new()),
};
Ok(self.mk_expr(span, ExprKind::ConstBlock(anon_const), AttrVec::new()))
let blk_span = anon_const.value.span;
Ok(self.mk_expr(span.to(blk_span), ExprKind::ConstBlock(anon_const), AttrVec::new()))
}
/// Parses mutability (`mut` or nothing).