@@ -17,7 +17,7 @@ use ast::{Public, Unsafety};
17
17
use ast:: { Mod , BiAdd , Arg , Arm , Attribute , BindByRef , BindByValue } ;
18
18
use ast:: { BiBitAnd , BiBitOr , BiBitXor , BiRem , BiLt , Block } ;
19
19
use ast:: { BlockCheckMode , CaptureByRef , CaptureByValue , CaptureClause } ;
20
- use ast:: { Constness , ConstImplItem , ConstTraitItem , Crate , CrateConfig } ;
20
+ use ast:: { Constness , ConstTraitItem , Crate , CrateConfig } ;
21
21
use ast:: { Decl , DeclItem , DeclLocal , DefaultBlock , DefaultReturn } ;
22
22
use ast:: { UnDeref , BiDiv , EMPTY_CTXT , EnumDef , ExplicitSelf } ;
23
23
use ast:: { Expr , Expr_ , ExprAddrOf , ExprMatch , ExprAgain } ;
@@ -39,7 +39,7 @@ use ast::{LitStr, LitInt, Local};
39
39
use ast:: { MacStmtWithBraces , MacStmtWithSemicolon , MacStmtWithoutBraces } ;
40
40
use ast:: { MutImmutable , MutMutable , Mac_ } ;
41
41
use ast:: { MutTy , BiMul , Mutability } ;
42
- use ast:: { MethodImplItem , NamedField , UnNeg , NoReturn , UnNot } ;
42
+ use ast:: { NamedField , UnNeg , NoReturn , UnNot } ;
43
43
use ast:: { Pat , PatBox , PatEnum , PatIdent , PatLit , PatQPath , PatMac , PatRange } ;
44
44
use ast:: { PatRegion , PatStruct , PatTup , PatVec , PatWild } ;
45
45
use ast:: { PolyTraitRef , QSelf } ;
@@ -52,7 +52,7 @@ use ast::{Ty, Ty_, TypeBinding, TyMac};
52
52
use ast:: { TyFixedLengthVec , TyBareFn , TyTypeof , TyInfer } ;
53
53
use ast:: { TyParam , TyParamBound , TyParen , TyPath , TyPolyTraitRef , TyPtr } ;
54
54
use ast:: { TyRptr , TyTup , TyU32 , TyVec } ;
55
- use ast:: { TypeImplItem , TypeTraitItem } ;
55
+ use ast:: TypeTraitItem ;
56
56
use ast:: { UnnamedField , UnsafeBlock } ;
57
57
use ast:: { ViewPath , ViewPathGlob , ViewPathList , ViewPathSimple } ;
58
58
use ast:: { Visibility , WhereClause } ;
@@ -4425,7 +4425,7 @@ impl<'a> Parser<'a> {
4425
4425
try!( self . expect ( & token:: Eq ) ) ;
4426
4426
let typ = try!( self . parse_ty_sum ( ) ) ;
4427
4427
try!( self . expect ( & token:: Semi ) ) ;
4428
- ( name, TypeImplItem ( typ) )
4428
+ ( name, ast :: ImplItemKind :: Type ( typ) )
4429
4429
} else if self . is_const_item ( ) {
4430
4430
try!( self . expect_keyword ( keywords:: Const ) ) ;
4431
4431
let name = try!( self . parse_ident ( ) ) ;
@@ -4434,7 +4434,7 @@ impl<'a> Parser<'a> {
4434
4434
try!( self . expect ( & token:: Eq ) ) ;
4435
4435
let expr = try!( self . parse_expr ( ) ) ;
4436
4436
try!( self . commit_expr_expecting ( & expr, token:: Semi ) ) ;
4437
- ( name, ConstImplItem ( typ, expr) )
4437
+ ( name, ast :: ImplItemKind :: Const ( typ, expr) )
4438
4438
} else {
4439
4439
let ( name, inner_attrs, node) = try!( self . parse_impl_method ( vis) ) ;
4440
4440
attrs. extend ( inner_attrs) ;
@@ -4464,7 +4464,7 @@ impl<'a> Parser<'a> {
4464
4464
4465
4465
/// Parse a method or a macro invocation in a trait impl.
4466
4466
fn parse_impl_method ( & mut self , vis : Visibility )
4467
- -> PResult < ( Ident , Vec < ast:: Attribute > , ast:: ImplItem_ ) > {
4467
+ -> PResult < ( Ident , Vec < ast:: Attribute > , ast:: ImplItemKind ) > {
4468
4468
// code copied from parse_macro_use_or_failure... abstraction!
4469
4469
if !self . token . is_any_keyword ( )
4470
4470
&& self . look_ahead ( 1 , |t| * t == token:: Not )
@@ -4490,7 +4490,7 @@ impl<'a> Parser<'a> {
4490
4490
if delim != token:: Brace {
4491
4491
try!( self . expect ( & token:: Semi ) )
4492
4492
}
4493
- Ok ( ( token:: special_idents:: invalid, vec ! [ ] , ast:: MacImplItem ( m) ) )
4493
+ Ok ( ( token:: special_idents:: invalid, vec ! [ ] , ast:: ImplItemKind :: Macro ( m) ) )
4494
4494
} else {
4495
4495
let ( constness, unsafety, abi) = try!( self . parse_fn_front_matter ( ) ) ;
4496
4496
let ident = try!( self . parse_ident ( ) ) ;
@@ -4500,7 +4500,7 @@ impl<'a> Parser<'a> {
4500
4500
} ) ) ;
4501
4501
generics. where_clause = try!( self . parse_where_clause ( ) ) ;
4502
4502
let ( inner_attrs, body) = try!( self . parse_inner_attrs_and_block ( ) ) ;
4503
- Ok ( ( ident, inner_attrs, MethodImplItem ( ast:: MethodSig {
4503
+ Ok ( ( ident, inner_attrs, ast :: ImplItemKind :: Method ( ast:: MethodSig {
4504
4504
generics : generics,
4505
4505
abi : abi,
4506
4506
explicit_self : explicit_self,
0 commit comments