diff options
| author | Austin Bonander <austin.bonander@gmail.com> | 2018-03-15 23:20:56 -0700 |
|---|---|---|
| committer | Austin Bonander <austin.bonander@gmail.com> | 2018-04-02 01:56:12 -0700 |
| commit | 7c0124dd357650acb9b7115a408712ea281d8d22 (patch) | |
| tree | 496bfd1527c0c074eb6a7b0d9e1b5c0dfe338f5b /src/libsyntax/parse/parser.rs | |
| parent | 517f24025a04e09936a6d07dc5298ca2b9371329 (diff) | |
| download | rust-7c0124dd357650acb9b7115a408712ea281d8d22.tar.gz rust-7c0124dd357650acb9b7115a408712ea281d8d22.zip | |
Expand attribute macros on statements and expressions.
Retains the `stmt_expr_attributes` feature requirement for attributes on expressions. closes #41475 cc #38356
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index b4b21285d3b..262198b6b15 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -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), |
