[breaking-change] don't pub export ast::Ty_ variants

This commit is contained in:
Oliver Schneider
2016-02-08 16:53:21 +01:00
parent ec61e632c0
commit 05d4cefd63
17 changed files with 126 additions and 128 deletions

View File

@@ -354,7 +354,7 @@ fn find_type_parameters(ty: &ast::Ty, ty_param_names: &[ast::Name]) -> Vec<P<ast
impl<'a> visit::Visitor<'a> for Visitor<'a> {
fn visit_ty(&mut self, ty: &'a ast::Ty) {
match ty.node {
ast::TyPath(_, ref path) if !path.global => {
ast::TyKind::Path(_, ref path) if !path.global => {
match path.segments.first() {
Some(segment) => {
if self.ty_param_names.contains(&segment.identifier.name) {
@@ -557,7 +557,7 @@ impl<'a> TraitDef<'a> {
for ty in tys {
// if we have already handled this type, skip it
if let ast::TyPath(_, ref p) = ty.node {
if let ast::TyKind::Path(_, ref p) = ty.node {
if p.segments.len() == 1
&& ty_param_names.contains(&p.segments[0].identifier.name)
|| processed_field_types.contains(&p.segments) {

View File

@@ -153,7 +153,7 @@ impl<'a> Ty<'a> {
cx.ty_path(self.to_path(cx, span, self_ty, self_generics))
}
Tuple(ref fields) => {
let ty = ast::TyTup(fields.iter()
let ty = ast::TyKind::Tup(fields.iter()
.map(|f| f.to_ty(cx, span, self_ty, self_generics))
.collect());
cx.ty(span, ty)

View File

@@ -448,7 +448,7 @@ impl<'a, 'b> Context<'a, 'b> {
-> P<ast::Expr> {
let sp = piece_ty.span;
let ty = ecx.ty_rptr(sp,
ecx.ty(sp, ast::TyVec(piece_ty)),
ecx.ty(sp, ast::TyKind::Vec(piece_ty)),
Some(ecx.lifetime(sp, special_idents::static_lifetime.name)),
ast::MutImmutable);
let slice = ecx.expr_vec_slice(sp, pieces);