diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-08-15 14:34:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-15 14:34:10 +0200 |
| commit | 6e8fabb4ac16b30c98968b768b860d2c2e1583d8 (patch) | |
| tree | 97262d6fe68846bffd0ebdb303403b4da9ed4ee1 /src/libsyntax/parse/parser/stmt.rs | |
| parent | 19d6178b8f44a8bee56b45df07116a6d490eb7d1 (diff) | |
| parent | a6182711efe32d4dd68da2663129e3e2e462d8cb (diff) | |
| download | rust-6e8fabb4ac16b30c98968b768b860d2c2e1583d8.tar.gz rust-6e8fabb4ac16b30c98968b768b860d2c2e1583d8.zip | |
Rollup merge of #63586 - petrochenkov:nospanned, r=eddyb
cleanup: Remove `Spanned` where possible It generally only makes sense on enums, otherwise it's more convenient to "flatten" it by adding a span field to the struct it wraps.
Diffstat (limited to 'src/libsyntax/parse/parser/stmt.rs')
| -rw-r--r-- | src/libsyntax/parse/parser/stmt.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser/stmt.rs b/src/libsyntax/parse/parser/stmt.rs index 750d8fbbddc..c911caba4cd 100644 --- a/src/libsyntax/parse/parser/stmt.rs +++ b/src/libsyntax/parse/parser/stmt.rs @@ -5,7 +5,7 @@ use super::path::PathStyle; use crate::ptr::P; use crate::{maybe_whole, ThinVec}; use crate::ast::{self, Stmt, StmtKind, Local, Block, BlockCheckMode, Expr, ExprKind}; -use crate::ast::{Attribute, AttrStyle, VisibilityKind, MacStmtStyle, Mac_, MacDelimiter}; +use crate::ast::{Attribute, AttrStyle, VisibilityKind, MacStmtStyle, Mac, MacDelimiter}; use crate::ext::base::DummyResult; use crate::parse::{classify, DirectoryOwnership}; use crate::parse::diagnostics::Error; @@ -99,12 +99,13 @@ impl<'a> Parser<'a> { MacStmtStyle::NoBraces }; - let mac = respan(lo.to(hi), Mac_ { + let mac = Mac { path, tts, delim, + span: lo.to(hi), prior_type_ascription: self.last_type_ascription, - }); + }; let node = if delim == MacDelimiter::Brace || self.token == token::Semi || self.token == token::Eof { StmtKind::Mac(P((mac, style, attrs.into()))) |
