diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-03-03 20:56:24 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-03-16 23:14:42 +0300 |
| commit | 0cf96131f444f15a2a4ac80f46a86f35fad8309a (patch) | |
| tree | 25433e9ca0b8fe821bdc78151a0a8e656a31cbc5 /src/libsyntax/parse | |
| parent | 63116d313dbc1e8f7f0fa4a729aea8e4f824b370 (diff) | |
| download | rust-0cf96131f444f15a2a4ac80f46a86f35fad8309a.tar.gz rust-0cf96131f444f15a2a4ac80f46a86f35fad8309a.zip | |
Refactor away `NestedMetaItemKind`
Remove methods `Attribute::span` and `MetaItem::span` duplicating public fields
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/attr.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs index dfdeb21cb74..e5571757e82 100644 --- a/src/libsyntax/parse/attr.rs +++ b/src/libsyntax/parse/attr.rs @@ -1,6 +1,5 @@ use crate::attr; use crate::ast; -use crate::source_map::respan; use crate::parse::{SeqSep, PResult}; use crate::parse::token::{self, Nonterminal, DelimToken}; use crate::parse::parser::{Parser, TokenType, PathStyle}; @@ -272,14 +271,14 @@ impl<'a> Parser<'a> { match self.parse_unsuffixed_lit() { Ok(lit) => { - return Ok(respan(lo.to(self.prev_span), ast::NestedMetaItemKind::Literal(lit))) + return Ok(ast::NestedMetaItem::Literal(lit)) } Err(ref mut err) => self.diagnostic().cancel(err) } match self.parse_meta_item() { Ok(mi) => { - return Ok(respan(lo.to(self.prev_span), ast::NestedMetaItemKind::MetaItem(mi))) + return Ok(ast::NestedMetaItem::MetaItem(mi)) } Err(ref mut err) => self.diagnostic().cancel(err) } |
