From 05d4cefd630cd9ae104555e69ceb3b1566298a6a Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Mon, 8 Feb 2016 16:53:21 +0100 Subject: [breaking-change] don't pub export ast::Ty_ variants --- src/libsyntax/ext/base.rs | 2 +- src/libsyntax/ext/build.rs | 14 +++++++------- src/libsyntax/ext/expand.rs | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/libsyntax/ext') 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 { 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, mutbl: ast::Mutability) -> ast::MutTy; - fn ty(&self, span: Span, ty: ast::Ty_) -> P; + fn ty(&self, span: Span, ty: ast::TyKind) -> P; fn ty_path(&self, ast::Path) -> P; fn ty_sum(&self, ast::Path, ast::TyParamBounds) -> P; fn ty_ident(&self, span: Span, idents: ast::Ident) -> P; @@ -385,7 +385,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> { } } - fn ty(&self, span: Span, ty: ast::Ty_) -> P { + fn ty(&self, span: Span, ty: ast::TyKind) -> P { 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 { - 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 { 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 { 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 { self.ty(span, - ast::TyPtr(self.ty_mt(ty, mutbl))) + ast::TyKind::Ptr(self.ty_mt(ty, mutbl))) } fn ty_option(&self, ty: P) -> P { @@ -440,7 +440,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> { } fn ty_infer(&self, span: Span) -> P { - 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, pub fn expand_type(t: P, fld: &mut MacroExpander) -> P { 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(), -- cgit 1.4.1-3-g733a5