Rename Ty.node to Ty.kind

This commit is contained in:
varkor
2019-09-26 17:25:31 +01:00
parent d4573c9c1e
commit c3d8791373
50 changed files with 138 additions and 137 deletions

View File

@@ -56,7 +56,7 @@ pub fn expand_concat_idents<'cx>(cx: &'cx mut ExtCtxt<'_>,
fn make_ty(self: Box<Self>) -> Option<P<ast::Ty>> {
Some(P(ast::Ty {
id: ast::DUMMY_NODE_ID,
node: ast::TyKind::Path(None, ast::Path::from_ident(self.ident)),
kind: ast::TyKind::Path(None, ast::Path::from_ident(self.ident)),
span: self.ident.span,
}))
}

View File

@@ -355,7 +355,7 @@ fn find_type_parameters(
impl<'a, 'b> visit::Visitor<'a> for Visitor<'a, 'b> {
fn visit_ty(&mut self, ty: &'a ast::Ty) {
if let ast::TyKind::Path(_, ref path) = ty.node {
if let ast::TyKind::Path(_, ref path) = ty.kind {
if let Some(segment) = path.segments.first() {
if self.ty_param_names.contains(&segment.ident.name) {
self.types.push(P(ty.clone()));
@@ -612,7 +612,7 @@ impl<'a> TraitDef<'a> {
for ty in tys {
// if we have already handled this type, skip it
if let ast::TyKind::Path(_, ref p) = ty.node {
if let ast::TyKind::Path(_, ref p) = ty.kind {
if p.segments.len() == 1 &&
ty_param_names.contains(&p.segments[0].ident.name) {
continue;

View File

@@ -285,7 +285,7 @@ fn has_test_signature(cx: &ExtCtxt<'_>, i: &ast::Item) -> bool {
// type implements the `Termination` trait as `libtest` enforces that.
let has_output = match decl.output {
ast::FunctionRetTy::Default(..) => false,
ast::FunctionRetTy::Ty(ref t) if t.node.is_unit() => false,
ast::FunctionRetTy::Ty(ref t) if t.kind.is_unit() => false,
_ => true
};