@@ -870,11 +870,11 @@ impl<'a, 'tcx> ErrorReporting<'tcx> for InferCtxt<'a, 'tcx> {
870870struct RebuildPathInfo < ' a > {
871871 path : & ' a ast:: Path ,
872872 // indexes to insert lifetime on path.lifetimes
873- indexes : Vec < uint > ,
873+ indexes : Vec < u32 > ,
874874 // number of lifetimes we expect to see on the type referred by `path`
875875 // (e.g., expected=1 for struct Foo<'a>)
876- expected : uint ,
877- anon_nums : & ' a HashSet < uint > ,
876+ expected : u32 ,
877+ anon_nums : & ' a HashSet < u32 > ,
878878 region_names : & ' a HashSet < ast:: Name >
879879}
880880
@@ -885,8 +885,8 @@ struct Rebuilder<'a, 'tcx: 'a> {
885885 generics : & ' a ast:: Generics ,
886886 same_regions : & ' a [ SameRegions ] ,
887887 life_giver : & ' a LifeGiver ,
888- cur_anon : Cell < uint > ,
889- inserted_anons : RefCell < HashSet < uint > > ,
888+ cur_anon : Cell < u32 > ,
889+ inserted_anons : RefCell < HashSet < u32 > > ,
890890}
891891
892892enum FreshOrKept {
@@ -976,7 +976,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
976976 }
977977
978978 fn extract_anon_nums_and_names ( & self , same_regions : & SameRegions )
979- -> ( HashSet < uint > , HashSet < ast:: Name > ) {
979+ -> ( HashSet < u32 > , HashSet < ast:: Name > ) {
980980 let mut anon_nums = HashSet :: new ( ) ;
981981 let mut region_names = HashSet :: new ( ) ;
982982 for br in same_regions. regions . iter ( ) {
@@ -1008,7 +1008,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
10081008 all_region_names
10091009 }
10101010
1011- fn inc_cur_anon ( & self , n : uint ) {
1011+ fn inc_cur_anon ( & self , n : u32 ) {
10121012 let anon = self . cur_anon . get ( ) ;
10131013 self . cur_anon . set ( anon+n) ;
10141014 }
@@ -1021,12 +1021,12 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
10211021 self . cur_anon . set ( anon) ;
10221022 }
10231023
1024- fn inc_and_offset_cur_anon ( & self , n : uint ) {
1024+ fn inc_and_offset_cur_anon ( & self , n : u32 ) {
10251025 self . inc_cur_anon ( n) ;
10261026 self . offset_cur_anon ( ) ;
10271027 }
10281028
1029- fn track_anon ( & self , anon : uint ) {
1029+ fn track_anon ( & self , anon : u32 ) {
10301030 self . inserted_anons . borrow_mut ( ) . insert ( anon) ;
10311031 }
10321032
@@ -1070,13 +1070,13 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
10701070 let lifetimes = last_seg. parameters . lifetimes ( ) ;
10711071 for ( i, lt) in lifetimes. iter ( ) . enumerate ( ) {
10721072 if region_names. contains ( & lt. name ) {
1073- insert. push ( i) ;
1073+ insert. push ( i as u32 ) ;
10741074 }
10751075 }
10761076 let rebuild_info = RebuildPathInfo {
10771077 path : & tr. path ,
10781078 indexes : insert,
1079- expected : lifetimes. len ( ) ,
1079+ expected : lifetimes. len ( ) as u32 ,
10801080 anon_nums : & HashSet :: new ( ) ,
10811081 region_names : region_names
10821082 } ;
@@ -1096,7 +1096,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
10961096 fn rebuild_expl_self ( & self ,
10971097 expl_self_opt : Option < ast:: ExplicitSelf_ > ,
10981098 lifetime : ast:: Lifetime ,
1099- anon_nums : & HashSet < uint > ,
1099+ anon_nums : & HashSet < u32 > ,
11001100 region_names : & HashSet < ast:: Name > )
11011101 -> Option < ast:: ExplicitSelf_ > {
11021102 match expl_self_opt {
@@ -1150,7 +1150,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
11501150 fn rebuild_args_ty ( & self ,
11511151 inputs : & [ ast:: Arg ] ,
11521152 lifetime : ast:: Lifetime ,
1153- anon_nums : & HashSet < uint > ,
1153+ anon_nums : & HashSet < u32 > ,
11541154 region_names : & HashSet < ast:: Name > )
11551155 -> Vec < ast:: Arg > {
11561156 let mut new_inputs = Vec :: new ( ) ;
@@ -1169,7 +1169,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
11691169
11701170 fn rebuild_output ( & self , ty : & ast:: FunctionRetTy ,
11711171 lifetime : ast:: Lifetime ,
1172- anon_nums : & HashSet < uint > ,
1172+ anon_nums : & HashSet < u32 > ,
11731173 region_names : & HashSet < ast:: Name > ) -> ast:: FunctionRetTy {
11741174 match * ty {
11751175 ast:: Return ( ref ret_ty) => ast:: Return (
@@ -1182,7 +1182,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
11821182 fn rebuild_arg_ty_or_output ( & self ,
11831183 ty : & ast:: Ty ,
11841184 lifetime : ast:: Lifetime ,
1185- anon_nums : & HashSet < uint > ,
1185+ anon_nums : & HashSet < u32 > ,
11861186 region_names : & HashSet < ast:: Name > )
11871187 -> P < ast:: Ty > {
11881188 let mut new_ty = P ( ty. clone ( ) ) ;
@@ -1229,7 +1229,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
12291229 let generics = ty:: lookup_item_type ( self . tcx , did) . generics ;
12301230
12311231 let expected =
1232- generics. regions . len ( subst:: TypeSpace ) ;
1232+ generics. regions . len ( subst:: TypeSpace ) as u32 ;
12331233 let lifetimes =
12341234 path. segments . last ( ) . unwrap ( ) . parameters . lifetimes ( ) ;
12351235 let mut insert = Vec :: new ( ) ;
@@ -1238,15 +1238,15 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
12381238 for ( i, a) in range ( anon,
12391239 anon+expected) . enumerate ( ) {
12401240 if anon_nums. contains ( & a) {
1241- insert. push ( i) ;
1241+ insert. push ( i as u32 ) ;
12421242 }
12431243 self . track_anon ( a) ;
12441244 }
12451245 self . inc_and_offset_cur_anon ( expected) ;
12461246 } else {
12471247 for ( i, lt) in lifetimes. iter ( ) . enumerate ( ) {
12481248 if region_names. contains ( & lt. name ) {
1249- insert. push ( i) ;
1249+ insert. push ( i as u32 ) ;
12501250 }
12511251 }
12521252 }
@@ -1363,7 +1363,7 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
13631363 }
13641364 } else {
13651365 for ( i, lt) in data. lifetimes . iter ( ) . enumerate ( ) {
1366- if indexes. contains ( & i ) {
1366+ if indexes. contains ( & ( i as u32 ) ) {
13671367 new_lts. push ( lifetime) ;
13681368 } else {
13691369 new_lts. push ( * lt) ;
0 commit comments