1
Fork 0

Expand attribute macros on statements and expressions.

Retains the `stmt_expr_attributes` feature requirement for attributes on expressions.

closes #41475
cc #38356
This commit is contained in:
Austin Bonander 2018-03-15 23:20:56 -07:00
parent 517f24025a
commit 7c0124dd35
16 changed files with 335 additions and 34 deletions

View file

@ -4601,6 +4601,9 @@ impl<'a> Parser<'a> {
/// Parse a statement, including the trailing semicolon.
pub fn parse_full_stmt(&mut self, macro_legacy_warnings: bool) -> PResult<'a, Option<Stmt>> {
// skip looking for a trailing semicolon when we have an interpolated statement
maybe_whole!(self, NtStmt, |x| Some(x));
let mut stmt = match self.parse_stmt_without_recovery(macro_legacy_warnings)? {
Some(stmt) => stmt,
None => return Ok(None),