@@ -158,7 +158,7 @@ pub struct StmtAnnAssign<U = ()> {
158
158
pub target : Box < Expr < U > > ,
159
159
pub annotation : Box < Expr < U > > ,
160
160
pub value : Option < Box < Expr < U > > > ,
161
- pub simple : usize ,
161
+ pub simple : u32 ,
162
162
}
163
163
164
164
impl < U > From < StmtAnnAssign < U > > for StmtKind < U > {
@@ -328,7 +328,7 @@ impl<U> From<StmtImport<U>> for StmtKind<U> {
328
328
pub struct StmtImportFrom < U = ( ) > {
329
329
pub module : Option < Ident > ,
330
330
pub names : Vec < Alias < U > > ,
331
- pub level : Option < usize > ,
331
+ pub level : Option < u32 > ,
332
332
}
333
333
334
334
impl < U > From < StmtImportFrom < U > > for StmtKind < U > {
@@ -610,7 +610,7 @@ impl<U> From<ExprCall<U>> for ExprKind<U> {
610
610
#[ derive( Clone , Debug , PartialEq ) ]
611
611
pub struct ExprFormattedValue < U = ( ) > {
612
612
pub value : Box < Expr < U > > ,
613
- pub conversion : usize ,
613
+ pub conversion : u32 ,
614
614
pub format_spec : Option < Box < Expr < U > > > ,
615
615
}
616
616
@@ -819,7 +819,7 @@ pub struct Comprehension<U = ()> {
819
819
pub target : Expr < U > ,
820
820
pub iter : Expr < U > ,
821
821
pub ifs : Vec < Expr < U > > ,
822
- pub is_async : usize ,
822
+ pub is_async : u32 ,
823
823
}
824
824
825
825
#[ derive( Clone , Debug , PartialEq ) ]
@@ -996,7 +996,7 @@ pub type Pattern<U = ()> = Attributed<PatternKind<U>, U>;
996
996
997
997
#[ derive( Clone , Debug , PartialEq ) ]
998
998
pub struct TypeIgnoreTypeIgnore {
999
- pub lineno : usize ,
999
+ pub lineno : u32 ,
1000
1000
pub tag : String ,
1001
1001
}
1002
1002
@@ -1019,6 +1019,7 @@ pub mod fold {
1019
1019
type TargetU ;
1020
1020
type Error ;
1021
1021
fn map_user ( & mut self , user : U ) -> Result < Self :: TargetU , Self :: Error > ;
1022
+
1022
1023
fn map_located < T > (
1023
1024
& mut self ,
1024
1025
located : Attributed < T , U > ,
@@ -1030,6 +1031,13 @@ pub mod fold {
1030
1031
node : located. node ,
1031
1032
} )
1032
1033
}
1034
+
1035
+ fn fold < X : Foldable < U , Self :: TargetU > > (
1036
+ & mut self ,
1037
+ node : X ,
1038
+ ) -> Result < X :: Mapped , Self :: Error > {
1039
+ node. fold ( self )
1040
+ }
1033
1041
fn fold_mod ( & mut self , node : Mod < U > ) -> Result < Mod < Self :: TargetU > , Self :: Error > {
1034
1042
fold_mod ( self , node)
1035
1043
}
0 commit comments