Rename Ty.node to Ty.kind
This commit is contained in:
@@ -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,
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user