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 16:53:21 +0100
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2016-02-11 12:34:48 +0100
commit05d4cefd630cd9ae104555e69ceb3b1566298a6a (patch)
treeaed7eb5d422c025726b39bbb9b9bc48a810c5f56 /src/libsyntax/ext
parentec61e632c0a00ccc2ca0494d5d3c8a0848c574f2 (diff)
downloadrust-05d4cefd630cd9ae104555e69ceb3b1566298a6a.tar.gz
rust-05d4cefd630cd9ae104555e69ceb3b1566298a6a.zip
[breaking-change] don't pub export ast::Ty_ variants
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/base.rs2
-rw-r--r--src/libsyntax/ext/build.rs14
-rw-r--r--src/libsyntax/ext/expand.rs4
3 files changed, 10 insertions, 10 deletions
diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs
index 33414a697a7..b58f8007e0a 100644
--- a/src/libsyntax/ext/base.rs
+++ b/src/libsyntax/ext/base.rs
@@ -367,7 +367,7 @@ impl DummyResult {
     pub fn raw_ty(sp: Span) -> P<ast::Ty> {
         P(ast::Ty {
             id: ast::DUMMY_NODE_ID,
-            node: ast::TyInfer,
+            node: ast::TyKind::Infer,
             span: sp
         })
     }
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs
index 1c2d1cebf3d..241ea976eee 100644
--- a/src/libsyntax/ext/build.rs
+++ b/src/libsyntax/ext/build.rs
@@ -52,7 +52,7 @@ pub trait AstBuilder {
     // types
     fn ty_mt(&self, ty: P<ast::Ty>, mutbl: ast::Mutability) -> ast::MutTy;
 
-    fn ty(&self, span: Span, ty: ast::Ty_) -> P<ast::Ty>;
+    fn ty(&self, span: Span, ty: ast::TyKind) -> P<ast::Ty>;
     fn ty_path(&self, ast::Path) -> P<ast::Ty>;
     fn ty_sum(&self, ast::Path, ast::TyParamBounds) -> P<ast::Ty>;
     fn ty_ident(&self, span: Span, idents: ast::Ident) -> P<ast::Ty>;
@@ -385,7 +385,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
         }
     }
 
-    fn ty(&self, span: Span, ty: ast::Ty_) -> P<ast::Ty> {
+    fn ty(&self, span: Span, ty: ast::TyKind) -> P<ast::Ty> {
         P(ast::Ty {
             id: ast::DUMMY_NODE_ID,
             span: span,
@@ -394,12 +394,12 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
     }
 
     fn ty_path(&self, path: ast::Path) -> P<ast::Ty> {
-        self.ty(path.span, ast::TyPath(None, path))
+        self.ty(path.span, ast::TyKind::Path(None, path))
     }
 
     fn ty_sum(&self, path: ast::Path, bounds: ast::TyParamBounds) -> P<ast::Ty> {
         self.ty(path.span,
-                ast::TyObjectSum(self.ty_path(path),
+                ast::TyKind::ObjectSum(self.ty_path(path),
                                  bounds))
     }
 
@@ -417,7 +417,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
                mutbl: ast::Mutability)
         -> P<ast::Ty> {
         self.ty(span,
-                ast::TyRptr(lifetime, self.ty_mt(ty, mutbl)))
+                ast::TyKind::Rptr(lifetime, self.ty_mt(ty, mutbl)))
     }
 
     fn ty_ptr(&self,
@@ -426,7 +426,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
               mutbl: ast::Mutability)
         -> P<ast::Ty> {
         self.ty(span,
-                ast::TyPtr(self.ty_mt(ty, mutbl)))
+                ast::TyKind::Ptr(self.ty_mt(ty, mutbl)))
     }
 
     fn ty_option(&self, ty: P<ast::Ty>) -> P<ast::Ty> {
@@ -440,7 +440,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
     }
 
     fn ty_infer(&self, span: Span) -> P<ast::Ty> {
-        self.ty(span, ast::TyInfer)
+        self.ty(span, ast::TyKind::Infer)
     }
 
     fn typaram(&self,
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index 69b932aa72b..9b31465b547 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -562,7 +562,7 @@ fn expand_non_macro_stmt(Spanned {node, span: stmt_span}: Stmt, fld: &mut MacroE
             DeclKind::Local(local) => {
                 // take it apart:
                 let rewritten_local = local.map(|Local {id, pat, ty, init, span, attrs}| {
-                    // expand the ty since TyFixedLengthVec contains an Expr
+                    // expand the ty since TyKind::FixedLengthVec contains an Expr
                     // and thus may have a macro use
                     let expanded_ty = ty.map(|t| fld.fold_ty(t));
                     // expand the pat (it might contain macro uses):
@@ -1133,7 +1133,7 @@ fn expand_and_rename_method(sig: ast::MethodSig, body: P<ast::Block>,
 
 pub fn expand_type(t: P<ast::Ty>, fld: &mut MacroExpander) -> P<ast::Ty> {
     let t = match t.node.clone() {
-        ast::Ty_::TyMac(mac) => {
+        ast::TyKind::Mac(mac) => {
             if fld.cx.ecfg.features.unwrap().type_macros {
                 let expanded_ty = match expand_mac_invoc(mac, t.span,
                                                          |r| r.make_ty(),