about summary refs log tree commit diff
path: root/src/libsyntax/attr
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-05-09 19:04:04 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-05-11 14:24:21 +0300
commita5b3f33cb90bf991342afa552bcd993e36f80fa7 (patch)
treeb9b0b68babb748088183f59438fed5baeba47fb9 /src/libsyntax/attr
parent751ae5af1a561a93ce61e9971be4b254a57e6576 (diff)
downloadrust-a5b3f33cb90bf991342afa552bcd993e36f80fa7.tar.gz
rust-a5b3f33cb90bf991342afa552bcd993e36f80fa7.zip
Eliminate `comments::Literal`
Diffstat (limited to 'src/libsyntax/attr')
-rw-r--r--src/libsyntax/attr/mod.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libsyntax/attr/mod.rs b/src/libsyntax/attr/mod.rs
index 2b874581083..e23c1826651 100644
--- a/src/libsyntax/attr/mod.rs
+++ b/src/libsyntax/attr/mod.rs
@@ -565,8 +565,9 @@ impl MetaItemKind {
             Some(TokenTree::Token(_, token::Eq)) => {
                 tokens.next();
                 return if let Some(TokenTree::Token(span, token)) = tokens.next() {
-                    LitKind::from_token(token)
-                        .map(|(node, token, suffix)| MetaItemKind::NameValue(Lit { node, token, suffix, span }))
+                    LitKind::from_token(token).map(|(node, token, suffix)| {
+                        MetaItemKind::NameValue(Lit { node, token, suffix, span })
+                    })
                 } else {
                     None
                 };
@@ -635,7 +636,7 @@ impl LitKind {
         }
     }
 
-    pub(crate) fn lit_token(&self) -> (token::Lit, Option<Symbol>) {
+    pub fn lit_token(&self) -> (token::Lit, Option<Symbol>) {
         use std::ascii;
 
         match *self {