about summary refs log tree commit diff
path: root/src/libsyntax_ext
diff options
context:
space:
mode:
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2016-02-08 17:06:20 +0100
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2016-02-11 12:34:48 +0100
commit69072c4f5d18d7a1762fbfb007b0ba3d6b59ad33 (patch)
tree8c9a87b64cd8054e093c1c07f6c0b987cd00f9c3 /src/libsyntax_ext
parent05d4cefd630cd9ae104555e69ceb3b1566298a6a (diff)
downloadrust-69072c4f5d18d7a1762fbfb007b0ba3d6b59ad33.tar.gz
rust-69072c4f5d18d7a1762fbfb007b0ba3d6b59ad33.zip
[breaking-change] don't pub export ast::Lit_ variants
Diffstat (limited to 'src/libsyntax_ext')
-rw-r--r--src/libsyntax_ext/concat.rs20
-rw-r--r--src/libsyntax_ext/deriving/debug.rs6
-rw-r--r--src/libsyntax_ext/format.rs2
3 files changed, 14 insertions, 14 deletions
diff --git a/src/libsyntax_ext/concat.rs b/src/libsyntax_ext/concat.rs
index 9f6cf73ed64..8ea0580d4c8 100644
--- a/src/libsyntax_ext/concat.rs
+++ b/src/libsyntax_ext/concat.rs
@@ -29,24 +29,24 @@ pub fn expand_syntax_ext(cx: &mut base::ExtCtxt,
         match e.node {
             ast::ExprKind::Lit(ref lit) => {
                 match lit.node {
-                    ast::LitStr(ref s, _) |
-                    ast::LitFloat(ref s, _) |
-                    ast::LitFloatUnsuffixed(ref s) => {
+                    ast::LitKind::Str(ref s, _) |
+                    ast::LitKind::Float(ref s, _) |
+                    ast::LitKind::FloatUnsuffixed(ref s) => {
                         accumulator.push_str(&s);
                     }
-                    ast::LitChar(c) => {
+                    ast::LitKind::Char(c) => {
                         accumulator.push(c);
                     }
-                    ast::LitInt(i, ast::UnsignedIntLit(_)) |
-                    ast::LitInt(i, ast::SignedIntLit(_)) |
-                    ast::LitInt(i, ast::UnsuffixedIntLit) => {
+                    ast::LitKind::Int(i, ast::UnsignedIntLit(_)) |
+                    ast::LitKind::Int(i, ast::SignedIntLit(_)) |
+                    ast::LitKind::Int(i, ast::UnsuffixedIntLit) => {
                         accumulator.push_str(&format!("{}", i));
                     }
-                    ast::LitBool(b) => {
+                    ast::LitKind::Bool(b) => {
                         accumulator.push_str(&format!("{}", b));
                     }
-                    ast::LitByte(..) |
-                    ast::LitByteStr(..) => {
+                    ast::LitKind::Byte(..) |
+                    ast::LitKind::ByteStr(..) => {
                         cx.span_err(e.span, "cannot concatenate a byte string literal");
                     }
                 }
diff --git a/src/libsyntax_ext/deriving/debug.rs b/src/libsyntax_ext/deriving/debug.rs
index 3c36ce57d18..1751f43e0a1 100644
--- a/src/libsyntax_ext/deriving/debug.rs
+++ b/src/libsyntax_ext/deriving/debug.rs
@@ -71,8 +71,8 @@ fn show_substructure(cx: &mut ExtCtxt, span: Span,
 
     // We want to make sure we have the expn_id set so that we can use unstable methods
     let span = Span { expn_id: cx.backtrace(), .. span };
-    let name = cx.expr_lit(span, ast::Lit_::LitStr(ident.name.as_str(),
-                                                   ast::StrStyle::CookedStr));
+    let name = cx.expr_lit(span, ast::LitKind::Str(ident.name.as_str(),
+                                                         ast::StrStyle::CookedStr));
     let builder = token::str_to_ident("builder");
     let builder_expr = cx.expr_ident(span, builder.clone());
 
@@ -112,7 +112,7 @@ fn show_substructure(cx: &mut ExtCtxt, span: Span,
                 stmts.push(cx.stmt_let(DUMMY_SP, true, builder, expr));
 
                 for field in fields {
-                    let name = cx.expr_lit(field.span, ast::Lit_::LitStr(
+                    let name = cx.expr_lit(field.span, ast::LitKind::Str(
                             field.name.unwrap().name.as_str(),
                             ast::StrStyle::CookedStr));
 
diff --git a/src/libsyntax_ext/format.rs b/src/libsyntax_ext/format.rs
index 21b32153ed9..541c2dbda4e 100644
--- a/src/libsyntax_ext/format.rs
+++ b/src/libsyntax_ext/format.rs
@@ -409,7 +409,7 @@ impl<'a, 'b> Context<'a, 'b> {
                 }
 
                 // Translate the format
-                let fill = self.ecx.expr_lit(sp, ast::LitChar(fill));
+                let fill = self.ecx.expr_lit(sp, ast::LitKind::Char(fill));
                 let align = |name| {
                     let mut p = Context::rtpath(self.ecx, "Alignment");
                     p.push(self.ecx.ident_of(name));