rename ast::ImplItem_::*ImplItem
to ast::ImplItemKind::*
This commit is contained in:
parent
e36872da5b
commit
d09220de13
12 changed files with 47 additions and 48 deletions
|
@ -236,7 +236,7 @@ impl<'a> FnLikeNode<'a> {
|
||||||
},
|
},
|
||||||
map::NodeImplItem(ii) => {
|
map::NodeImplItem(ii) => {
|
||||||
match ii.node {
|
match ii.node {
|
||||||
ast::ImplItem_::Method(ref sig, ref body) => {
|
ast::ImplItemKind::Method(ref sig, ref body) => {
|
||||||
method(ii.id, ii.name, sig, Some(ii.vis), body, ii.span)
|
method(ii.id, ii.name, sig, Some(ii.vis), body, ii.span)
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
|
|
|
@ -623,7 +623,7 @@ impl fold::Folder for ReplaceBodyWithLoop {
|
||||||
|
|
||||||
fn fold_impl_item(&mut self, i: P<ast::ImplItem>) -> SmallVector<P<ast::ImplItem>> {
|
fn fold_impl_item(&mut self, i: P<ast::ImplItem>) -> SmallVector<P<ast::ImplItem>> {
|
||||||
match i.node {
|
match i.node {
|
||||||
ast::ConstImplItem(..) => {
|
ast::ImplItemKind::Const(..) => {
|
||||||
self.within_static_or_const = true;
|
self.within_static_or_const = true;
|
||||||
let ret = fold::noop_fold_impl_item(i, self);
|
let ret = fold::noop_fold_impl_item(i, self);
|
||||||
self.within_static_or_const = false;
|
self.within_static_or_const = false;
|
||||||
|
|
|
@ -675,14 +675,14 @@ pub fn lower_impl_item(_lctx: &LoweringContext, i: &ImplItem) -> P<hir::ImplItem
|
||||||
attrs: i.attrs.clone(),
|
attrs: i.attrs.clone(),
|
||||||
vis: lower_visibility(_lctx, i.vis),
|
vis: lower_visibility(_lctx, i.vis),
|
||||||
node: match i.node {
|
node: match i.node {
|
||||||
ConstImplItem(ref ty, ref expr) => {
|
ImplItemKind::Const(ref ty, ref expr) => {
|
||||||
hir::ImplItemKind::Const(lower_ty(_lctx, ty), lower_expr(_lctx, expr))
|
hir::ImplItemKind::Const(lower_ty(_lctx, ty), lower_expr(_lctx, expr))
|
||||||
}
|
}
|
||||||
MethodImplItem(ref sig, ref body) => {
|
ImplItemKind::Method(ref sig, ref body) => {
|
||||||
hir::ImplItemKind::Method(lower_method_sig(_lctx, sig), lower_block(_lctx, body))
|
hir::ImplItemKind::Method(lower_method_sig(_lctx, sig), lower_block(_lctx, body))
|
||||||
}
|
}
|
||||||
TypeImplItem(ref ty) => hir::ImplItemKind::Type(lower_ty(_lctx, ty)),
|
ImplItemKind::Type(ref ty) => hir::ImplItemKind::Type(lower_ty(_lctx, ty)),
|
||||||
MacImplItem(..) => panic!("Shouldn't exist any more"),
|
ImplItemKind::Macro(..) => panic!("Shouldn't exist any more"),
|
||||||
},
|
},
|
||||||
span: i.span,
|
span: i.span,
|
||||||
})
|
})
|
||||||
|
|
|
@ -992,22 +992,22 @@ impl<'l, 'tcx, 'v> Visitor<'v> for DumpCsvVisitor<'l, 'tcx> {
|
||||||
|
|
||||||
fn visit_impl_item(&mut self, impl_item: &ast::ImplItem) {
|
fn visit_impl_item(&mut self, impl_item: &ast::ImplItem) {
|
||||||
match impl_item.node {
|
match impl_item.node {
|
||||||
ast::ConstImplItem(ref ty, ref expr) => {
|
ast::ImplItemKind::Const(ref ty, ref expr) => {
|
||||||
self.process_const(impl_item.id,
|
self.process_const(impl_item.id,
|
||||||
impl_item.ident.name,
|
impl_item.ident.name,
|
||||||
impl_item.span,
|
impl_item.span,
|
||||||
&ty,
|
&ty,
|
||||||
&expr);
|
&expr);
|
||||||
}
|
}
|
||||||
ast::MethodImplItem(ref sig, ref body) => {
|
ast::ImplItemKind::Method(ref sig, ref body) => {
|
||||||
self.process_method(sig,
|
self.process_method(sig,
|
||||||
Some(body),
|
Some(body),
|
||||||
impl_item.id,
|
impl_item.id,
|
||||||
impl_item.ident.name,
|
impl_item.ident.name,
|
||||||
impl_item.span);
|
impl_item.span);
|
||||||
}
|
}
|
||||||
ast::TypeImplItem(_) |
|
ast::ImplItemKind::Type(_) |
|
||||||
ast::MacImplItem(_) => {}
|
ast::ImplItemKind::Macro(_) => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@ pub use self::Expr_::*;
|
||||||
pub use self::FloatTy::*;
|
pub use self::FloatTy::*;
|
||||||
pub use self::FunctionRetTy::*;
|
pub use self::FunctionRetTy::*;
|
||||||
pub use self::ForeignItem_::*;
|
pub use self::ForeignItem_::*;
|
||||||
pub use self::ImplItem_::*;
|
|
||||||
pub use self::IntTy::*;
|
pub use self::IntTy::*;
|
||||||
pub use self::Item_::*;
|
pub use self::Item_::*;
|
||||||
pub use self::KleeneOp::*;
|
pub use self::KleeneOp::*;
|
||||||
|
@ -1230,16 +1229,16 @@ pub struct ImplItem {
|
||||||
pub ident: Ident,
|
pub ident: Ident,
|
||||||
pub vis: Visibility,
|
pub vis: Visibility,
|
||||||
pub attrs: Vec<Attribute>,
|
pub attrs: Vec<Attribute>,
|
||||||
pub node: ImplItem_,
|
pub node: ImplItemKind,
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||||
pub enum ImplItem_ {
|
pub enum ImplItemKind {
|
||||||
ConstImplItem(P<Ty>, P<Expr>),
|
Const(P<Ty>, P<Expr>),
|
||||||
MethodImplItem(MethodSig, P<Block>),
|
Method(MethodSig, P<Block>),
|
||||||
TypeImplItem(P<Ty>),
|
Type(P<Ty>),
|
||||||
MacImplItem(Mac),
|
Macro(Mac),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Copy)]
|
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Copy)]
|
||||||
|
|
|
@ -480,7 +480,7 @@ impl<'a> TraitDef<'a> {
|
||||||
ident: ident,
|
ident: ident,
|
||||||
vis: ast::Inherited,
|
vis: ast::Inherited,
|
||||||
attrs: Vec::new(),
|
attrs: Vec::new(),
|
||||||
node: ast::TypeImplItem(type_def.to_ty(cx,
|
node: ast::ImplItemKind::Type(type_def.to_ty(cx,
|
||||||
self.span,
|
self.span,
|
||||||
type_ident,
|
type_ident,
|
||||||
generics
|
generics
|
||||||
|
@ -895,7 +895,7 @@ impl<'a> MethodDef<'a> {
|
||||||
span: trait_.span,
|
span: trait_.span,
|
||||||
vis: ast::Inherited,
|
vis: ast::Inherited,
|
||||||
ident: method_ident,
|
ident: method_ident,
|
||||||
node: ast::MethodImplItem(ast::MethodSig {
|
node: ast::ImplItemKind::Method(ast::MethodSig {
|
||||||
generics: fn_generics,
|
generics: fn_generics,
|
||||||
abi: abi,
|
abi: abi,
|
||||||
explicit_self: explicit_self,
|
explicit_self: explicit_self,
|
||||||
|
|
|
@ -1030,23 +1030,23 @@ fn expand_item_multi_modifier(mut it: Annotatable,
|
||||||
fn expand_impl_item(ii: P<ast::ImplItem>, fld: &mut MacroExpander)
|
fn expand_impl_item(ii: P<ast::ImplItem>, fld: &mut MacroExpander)
|
||||||
-> SmallVector<P<ast::ImplItem>> {
|
-> SmallVector<P<ast::ImplItem>> {
|
||||||
match ii.node {
|
match ii.node {
|
||||||
ast::MethodImplItem(..) => SmallVector::one(ii.map(|ii| ast::ImplItem {
|
ast::ImplItemKind::Method(..) => SmallVector::one(ii.map(|ii| ast::ImplItem {
|
||||||
id: ii.id,
|
id: ii.id,
|
||||||
ident: ii.ident,
|
ident: ii.ident,
|
||||||
attrs: ii.attrs,
|
attrs: ii.attrs,
|
||||||
vis: ii.vis,
|
vis: ii.vis,
|
||||||
node: match ii.node {
|
node: match ii.node {
|
||||||
ast::MethodImplItem(sig, body) => {
|
ast::ImplItemKind::Method(sig, body) => {
|
||||||
let (sig, body) = expand_and_rename_method(sig, body, fld);
|
let (sig, body) = expand_and_rename_method(sig, body, fld);
|
||||||
ast::MethodImplItem(sig, body)
|
ast::ImplItemKind::Method(sig, body)
|
||||||
}
|
}
|
||||||
_ => unreachable!()
|
_ => unreachable!()
|
||||||
},
|
},
|
||||||
span: fld.new_span(ii.span)
|
span: fld.new_span(ii.span)
|
||||||
})),
|
})),
|
||||||
ast::MacImplItem(_) => {
|
ast::ImplItemKind::Macro(_) => {
|
||||||
let (span, mac) = ii.and_then(|ii| match ii.node {
|
let (span, mac) = ii.and_then(|ii| match ii.node {
|
||||||
ast::MacImplItem(mac) => (ii.span, mac),
|
ast::ImplItemKind::Macro(mac) => (ii.span, mac),
|
||||||
_ => unreachable!()
|
_ => unreachable!()
|
||||||
});
|
});
|
||||||
let maybe_new_items =
|
let maybe_new_items =
|
||||||
|
|
|
@ -998,12 +998,12 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
|
||||||
|
|
||||||
fn visit_impl_item(&mut self, ii: &'v ast::ImplItem) {
|
fn visit_impl_item(&mut self, ii: &'v ast::ImplItem) {
|
||||||
match ii.node {
|
match ii.node {
|
||||||
ast::ConstImplItem(..) => {
|
ast::ImplItemKind::Const(..) => {
|
||||||
self.gate_feature("associated_consts",
|
self.gate_feature("associated_consts",
|
||||||
ii.span,
|
ii.span,
|
||||||
"associated constants are experimental")
|
"associated constants are experimental")
|
||||||
}
|
}
|
||||||
ast::MethodImplItem(ref sig, _) => {
|
ast::ImplItemKind::Method(ref sig, _) => {
|
||||||
if sig.constness == ast::Constness::Const {
|
if sig.constness == ast::Constness::Const {
|
||||||
self.gate_feature("const_fn", ii.span, "const fn is unstable");
|
self.gate_feature("const_fn", ii.span, "const fn is unstable");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1001,15 +1001,15 @@ pub fn noop_fold_impl_item<T: Folder>(i: P<ImplItem>, folder: &mut T)
|
||||||
attrs: fold_attrs(attrs, folder),
|
attrs: fold_attrs(attrs, folder),
|
||||||
vis: vis,
|
vis: vis,
|
||||||
node: match node {
|
node: match node {
|
||||||
ConstImplItem(ty, expr) => {
|
ast::ImplItemKind::Const(ty, expr) => {
|
||||||
ConstImplItem(folder.fold_ty(ty), folder.fold_expr(expr))
|
ast::ImplItemKind::Const(folder.fold_ty(ty), folder.fold_expr(expr))
|
||||||
}
|
}
|
||||||
MethodImplItem(sig, body) => {
|
ast::ImplItemKind::Method(sig, body) => {
|
||||||
MethodImplItem(noop_fold_method_sig(sig, folder),
|
ast::ImplItemKind::Method(noop_fold_method_sig(sig, folder),
|
||||||
folder.fold_block(body))
|
folder.fold_block(body))
|
||||||
}
|
}
|
||||||
TypeImplItem(ty) => TypeImplItem(folder.fold_ty(ty)),
|
ast::ImplItemKind::Type(ty) => ast::ImplItemKind::Type(folder.fold_ty(ty)),
|
||||||
MacImplItem(mac) => MacImplItem(folder.fold_mac(mac))
|
ast::ImplItemKind::Macro(mac) => ast::ImplItemKind::Macro(folder.fold_mac(mac))
|
||||||
},
|
},
|
||||||
span: folder.new_span(span)
|
span: folder.new_span(span)
|
||||||
}))
|
}))
|
||||||
|
|
|
@ -17,7 +17,7 @@ use ast::{Public, Unsafety};
|
||||||
use ast::{Mod, BiAdd, Arg, Arm, Attribute, BindByRef, BindByValue};
|
use ast::{Mod, BiAdd, Arg, Arm, Attribute, BindByRef, BindByValue};
|
||||||
use ast::{BiBitAnd, BiBitOr, BiBitXor, BiRem, BiLt, Block};
|
use ast::{BiBitAnd, BiBitOr, BiBitXor, BiRem, BiLt, Block};
|
||||||
use ast::{BlockCheckMode, CaptureByRef, CaptureByValue, CaptureClause};
|
use ast::{BlockCheckMode, CaptureByRef, CaptureByValue, CaptureClause};
|
||||||
use ast::{Constness, ConstImplItem, ConstTraitItem, Crate, CrateConfig};
|
use ast::{Constness, ConstTraitItem, Crate, CrateConfig};
|
||||||
use ast::{Decl, DeclItem, DeclLocal, DefaultBlock, DefaultReturn};
|
use ast::{Decl, DeclItem, DeclLocal, DefaultBlock, DefaultReturn};
|
||||||
use ast::{UnDeref, BiDiv, EMPTY_CTXT, EnumDef, ExplicitSelf};
|
use ast::{UnDeref, BiDiv, EMPTY_CTXT, EnumDef, ExplicitSelf};
|
||||||
use ast::{Expr, Expr_, ExprAddrOf, ExprMatch, ExprAgain};
|
use ast::{Expr, Expr_, ExprAddrOf, ExprMatch, ExprAgain};
|
||||||
|
@ -39,7 +39,7 @@ use ast::{LitStr, LitInt, Local};
|
||||||
use ast::{MacStmtWithBraces, MacStmtWithSemicolon, MacStmtWithoutBraces};
|
use ast::{MacStmtWithBraces, MacStmtWithSemicolon, MacStmtWithoutBraces};
|
||||||
use ast::{MutImmutable, MutMutable, Mac_};
|
use ast::{MutImmutable, MutMutable, Mac_};
|
||||||
use ast::{MutTy, BiMul, Mutability};
|
use ast::{MutTy, BiMul, Mutability};
|
||||||
use ast::{MethodImplItem, NamedField, UnNeg, NoReturn, UnNot};
|
use ast::{NamedField, UnNeg, NoReturn, UnNot};
|
||||||
use ast::{Pat, PatBox, PatEnum, PatIdent, PatLit, PatQPath, PatMac, PatRange};
|
use ast::{Pat, PatBox, PatEnum, PatIdent, PatLit, PatQPath, PatMac, PatRange};
|
||||||
use ast::{PatRegion, PatStruct, PatTup, PatVec, PatWild};
|
use ast::{PatRegion, PatStruct, PatTup, PatVec, PatWild};
|
||||||
use ast::{PolyTraitRef, QSelf};
|
use ast::{PolyTraitRef, QSelf};
|
||||||
|
@ -52,7 +52,7 @@ use ast::{Ty, Ty_, TypeBinding, TyMac};
|
||||||
use ast::{TyFixedLengthVec, TyBareFn, TyTypeof, TyInfer};
|
use ast::{TyFixedLengthVec, TyBareFn, TyTypeof, TyInfer};
|
||||||
use ast::{TyParam, TyParamBound, TyParen, TyPath, TyPolyTraitRef, TyPtr};
|
use ast::{TyParam, TyParamBound, TyParen, TyPath, TyPolyTraitRef, TyPtr};
|
||||||
use ast::{TyRptr, TyTup, TyU32, TyVec};
|
use ast::{TyRptr, TyTup, TyU32, TyVec};
|
||||||
use ast::{TypeImplItem, TypeTraitItem};
|
use ast::TypeTraitItem;
|
||||||
use ast::{UnnamedField, UnsafeBlock};
|
use ast::{UnnamedField, UnsafeBlock};
|
||||||
use ast::{ViewPath, ViewPathGlob, ViewPathList, ViewPathSimple};
|
use ast::{ViewPath, ViewPathGlob, ViewPathList, ViewPathSimple};
|
||||||
use ast::{Visibility, WhereClause};
|
use ast::{Visibility, WhereClause};
|
||||||
|
@ -4425,7 +4425,7 @@ impl<'a> Parser<'a> {
|
||||||
try!(self.expect(&token::Eq));
|
try!(self.expect(&token::Eq));
|
||||||
let typ = try!(self.parse_ty_sum());
|
let typ = try!(self.parse_ty_sum());
|
||||||
try!(self.expect(&token::Semi));
|
try!(self.expect(&token::Semi));
|
||||||
(name, TypeImplItem(typ))
|
(name, ast::ImplItemKind::Type(typ))
|
||||||
} else if self.is_const_item() {
|
} else if self.is_const_item() {
|
||||||
try!(self.expect_keyword(keywords::Const));
|
try!(self.expect_keyword(keywords::Const));
|
||||||
let name = try!(self.parse_ident());
|
let name = try!(self.parse_ident());
|
||||||
|
@ -4434,7 +4434,7 @@ impl<'a> Parser<'a> {
|
||||||
try!(self.expect(&token::Eq));
|
try!(self.expect(&token::Eq));
|
||||||
let expr = try!(self.parse_expr());
|
let expr = try!(self.parse_expr());
|
||||||
try!(self.commit_expr_expecting(&expr, token::Semi));
|
try!(self.commit_expr_expecting(&expr, token::Semi));
|
||||||
(name, ConstImplItem(typ, expr))
|
(name, ast::ImplItemKind::Const(typ, expr))
|
||||||
} else {
|
} else {
|
||||||
let (name, inner_attrs, node) = try!(self.parse_impl_method(vis));
|
let (name, inner_attrs, node) = try!(self.parse_impl_method(vis));
|
||||||
attrs.extend(inner_attrs);
|
attrs.extend(inner_attrs);
|
||||||
|
@ -4464,7 +4464,7 @@ impl<'a> Parser<'a> {
|
||||||
|
|
||||||
/// Parse a method or a macro invocation in a trait impl.
|
/// Parse a method or a macro invocation in a trait impl.
|
||||||
fn parse_impl_method(&mut self, vis: Visibility)
|
fn parse_impl_method(&mut self, vis: Visibility)
|
||||||
-> PResult<(Ident, Vec<ast::Attribute>, ast::ImplItem_)> {
|
-> PResult<(Ident, Vec<ast::Attribute>, ast::ImplItemKind)> {
|
||||||
// code copied from parse_macro_use_or_failure... abstraction!
|
// code copied from parse_macro_use_or_failure... abstraction!
|
||||||
if !self.token.is_any_keyword()
|
if !self.token.is_any_keyword()
|
||||||
&& self.look_ahead(1, |t| *t == token::Not)
|
&& self.look_ahead(1, |t| *t == token::Not)
|
||||||
|
@ -4490,7 +4490,7 @@ impl<'a> Parser<'a> {
|
||||||
if delim != token::Brace {
|
if delim != token::Brace {
|
||||||
try!(self.expect(&token::Semi))
|
try!(self.expect(&token::Semi))
|
||||||
}
|
}
|
||||||
Ok((token::special_idents::invalid, vec![], ast::MacImplItem(m)))
|
Ok((token::special_idents::invalid, vec![], ast::ImplItemKind::Macro(m)))
|
||||||
} else {
|
} else {
|
||||||
let (constness, unsafety, abi) = try!(self.parse_fn_front_matter());
|
let (constness, unsafety, abi) = try!(self.parse_fn_front_matter());
|
||||||
let ident = try!(self.parse_ident());
|
let ident = try!(self.parse_ident());
|
||||||
|
@ -4500,7 +4500,7 @@ impl<'a> Parser<'a> {
|
||||||
}));
|
}));
|
||||||
generics.where_clause = try!(self.parse_where_clause());
|
generics.where_clause = try!(self.parse_where_clause());
|
||||||
let (inner_attrs, body) = try!(self.parse_inner_attrs_and_block());
|
let (inner_attrs, body) = try!(self.parse_inner_attrs_and_block());
|
||||||
Ok((ident, inner_attrs, MethodImplItem(ast::MethodSig {
|
Ok((ident, inner_attrs, ast::ImplItemKind::Method(ast::MethodSig {
|
||||||
generics: generics,
|
generics: generics,
|
||||||
abi: abi,
|
abi: abi,
|
||||||
explicit_self: explicit_self,
|
explicit_self: explicit_self,
|
||||||
|
|
|
@ -1576,19 +1576,19 @@ impl<'a> State<'a> {
|
||||||
try!(self.maybe_print_comment(ii.span.lo));
|
try!(self.maybe_print_comment(ii.span.lo));
|
||||||
try!(self.print_outer_attributes(&ii.attrs));
|
try!(self.print_outer_attributes(&ii.attrs));
|
||||||
match ii.node {
|
match ii.node {
|
||||||
ast::ConstImplItem(ref ty, ref expr) => {
|
ast::ImplItemKind::Const(ref ty, ref expr) => {
|
||||||
try!(self.print_associated_const(ii.ident, &ty, Some(&expr), ii.vis));
|
try!(self.print_associated_const(ii.ident, &ty, Some(&expr), ii.vis));
|
||||||
}
|
}
|
||||||
ast::MethodImplItem(ref sig, ref body) => {
|
ast::ImplItemKind::Method(ref sig, ref body) => {
|
||||||
try!(self.head(""));
|
try!(self.head(""));
|
||||||
try!(self.print_method_sig(ii.ident, sig, ii.vis));
|
try!(self.print_method_sig(ii.ident, sig, ii.vis));
|
||||||
try!(self.nbsp());
|
try!(self.nbsp());
|
||||||
try!(self.print_block_with_attrs(body, &ii.attrs));
|
try!(self.print_block_with_attrs(body, &ii.attrs));
|
||||||
}
|
}
|
||||||
ast::TypeImplItem(ref ty) => {
|
ast::ImplItemKind::Type(ref ty) => {
|
||||||
try!(self.print_associated_type(ii.ident, None, Some(ty)));
|
try!(self.print_associated_type(ii.ident, None, Some(ty)));
|
||||||
}
|
}
|
||||||
ast::MacImplItem(codemap::Spanned { ref node, .. }) => {
|
ast::ImplItemKind::Macro(codemap::Spanned { ref node, .. }) => {
|
||||||
// code copied from ItemMac:
|
// code copied from ItemMac:
|
||||||
try!(self.print_path(&node.path, false, 0));
|
try!(self.print_path(&node.path, false, 0));
|
||||||
try!(word(&mut self.s, "! "));
|
try!(word(&mut self.s, "! "));
|
||||||
|
|
|
@ -588,18 +588,18 @@ pub fn walk_impl_item<'v, V: Visitor<'v>>(visitor: &mut V, impl_item: &'v ImplIt
|
||||||
visitor.visit_ident(impl_item.span, impl_item.ident);
|
visitor.visit_ident(impl_item.span, impl_item.ident);
|
||||||
walk_list!(visitor, visit_attribute, &impl_item.attrs);
|
walk_list!(visitor, visit_attribute, &impl_item.attrs);
|
||||||
match impl_item.node {
|
match impl_item.node {
|
||||||
ConstImplItem(ref ty, ref expr) => {
|
ImplItemKind::Const(ref ty, ref expr) => {
|
||||||
visitor.visit_ty(ty);
|
visitor.visit_ty(ty);
|
||||||
visitor.visit_expr(expr);
|
visitor.visit_expr(expr);
|
||||||
}
|
}
|
||||||
MethodImplItem(ref sig, ref body) => {
|
ImplItemKind::Method(ref sig, ref body) => {
|
||||||
visitor.visit_fn(FnKind::Method(impl_item.ident, sig, Some(impl_item.vis)), &sig.decl,
|
visitor.visit_fn(FnKind::Method(impl_item.ident, sig, Some(impl_item.vis)), &sig.decl,
|
||||||
body, impl_item.span, impl_item.id);
|
body, impl_item.span, impl_item.id);
|
||||||
}
|
}
|
||||||
TypeImplItem(ref ty) => {
|
ImplItemKind::Type(ref ty) => {
|
||||||
visitor.visit_ty(ty);
|
visitor.visit_ty(ty);
|
||||||
}
|
}
|
||||||
MacImplItem(ref mac) => {
|
ImplItemKind::Macro(ref mac) => {
|
||||||
visitor.visit_mac(mac);
|
visitor.visit_mac(mac);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue