@@ -839,9 +839,9 @@ trait ebml_writer_helpers {
839839 fn emit_type_param_def ( & mut self ,
840840 ecx : & e:: EncodeContext ,
841841 type_param_def : & ty:: TypeParameterDef ) ;
842- fn emit_tpbt ( & mut self ,
843- ecx : & e:: EncodeContext ,
844- tpbt : ty:: ty_param_bounds_and_ty ) ;
842+ fn emit_polytype ( & mut self ,
843+ ecx : & e:: EncodeContext ,
844+ pty : ty:: Polytype ) ;
845845 fn emit_substs ( & mut self , ecx : & e:: EncodeContext , substs : & subst:: Substs ) ;
846846 fn emit_auto_adjustment ( & mut self , ecx : & e:: EncodeContext , adj : & ty:: AutoAdjustment ) ;
847847}
@@ -865,26 +865,26 @@ impl<'a> ebml_writer_helpers for Encoder<'a> {
865865 } ) ;
866866 }
867867
868- fn emit_tpbt ( & mut self ,
868+ fn emit_polytype ( & mut self ,
869869 ecx : & e:: EncodeContext ,
870- tpbt : ty:: ty_param_bounds_and_ty ) {
871- self . emit_struct ( "ty_param_bounds_and_ty " , 2 , |this| {
870+ pty : ty:: Polytype ) {
871+ self . emit_struct ( "Polytype " , 2 , |this| {
872872 this. emit_struct_field ( "generics" , 0 , |this| {
873873 this. emit_struct ( "Generics" , 2 , |this| {
874874 this. emit_struct_field ( "types" , 0 , |this| {
875875 Ok ( encode_vec_per_param_space (
876- this, & tpbt . generics . types ,
876+ this, & pty . generics . types ,
877877 |this, def| this. emit_type_param_def ( ecx, def) ) )
878878 } ) ;
879879 this. emit_struct_field ( "regions" , 1 , |this| {
880880 Ok ( encode_vec_per_param_space (
881- this, & tpbt . generics . regions ,
881+ this, & pty . generics . regions ,
882882 |this, def| def. encode ( this) . unwrap ( ) ) )
883883 } )
884884 } )
885885 } ) ;
886886 this. emit_struct_field ( "ty" , 1 , |this| {
887- Ok ( this. emit_ty ( ecx, tpbt . ty ) )
887+ Ok ( this. emit_ty ( ecx, pty . ty ) )
888888 } )
889889 } ) ;
890890 }
@@ -1030,11 +1030,11 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext,
10301030 }
10311031
10321032 let lid = ast:: DefId { krate : ast:: LOCAL_CRATE , node : id } ;
1033- for & tpbt in tcx. tcache . borrow ( ) . find ( & lid) . iter ( ) {
1033+ for & pty in tcx. tcache . borrow ( ) . find ( & lid) . iter ( ) {
10341034 ebml_w. tag ( c:: tag_table_tcache, |ebml_w| {
10351035 ebml_w. id ( id) ;
10361036 ebml_w. tag ( c:: tag_table_val, |ebml_w| {
1037- ebml_w. emit_tpbt ( ecx, tpbt . clone ( ) ) ;
1037+ ebml_w. emit_polytype ( ecx, pty . clone ( ) ) ;
10381038 } )
10391039 } )
10401040 }
@@ -1142,8 +1142,8 @@ trait ebml_decoder_decoder_helpers {
11421142 fn read_tys ( & mut self , xcx : & ExtendedDecodeContext ) -> Vec < ty:: t > ;
11431143 fn read_type_param_def ( & mut self , xcx : & ExtendedDecodeContext )
11441144 -> ty:: TypeParameterDef ;
1145- fn read_ty_param_bounds_and_ty ( & mut self , xcx : & ExtendedDecodeContext )
1146- -> ty:: ty_param_bounds_and_ty ;
1145+ fn read_polytype ( & mut self , xcx : & ExtendedDecodeContext )
1146+ -> ty:: Polytype ;
11471147 fn read_substs ( & mut self , xcx : & ExtendedDecodeContext ) -> subst:: Substs ;
11481148 fn read_auto_adjustment ( & mut self , xcx : & ExtendedDecodeContext ) -> ty:: AutoAdjustment ;
11491149 fn convert_def_id ( & mut self ,
@@ -1245,10 +1245,10 @@ impl<'a> ebml_decoder_decoder_helpers for reader::Decoder<'a> {
12451245 } ) . unwrap ( )
12461246 }
12471247
1248- fn read_ty_param_bounds_and_ty ( & mut self , xcx : & ExtendedDecodeContext )
1249- -> ty:: ty_param_bounds_and_ty {
1250- self . read_struct ( "ty_param_bounds_and_ty " , 2 , |this| {
1251- Ok ( ty:: ty_param_bounds_and_ty {
1248+ fn read_polytype ( & mut self , xcx : & ExtendedDecodeContext )
1249+ -> ty:: Polytype {
1250+ self . read_struct ( "Polytype " , 2 , |this| {
1251+ Ok ( ty:: Polytype {
12521252 generics : this. read_struct_field ( "generics" , 0 , |this| {
12531253 this. read_struct ( "Generics" , 2 , |this| {
12541254 Ok ( ty:: Generics {
@@ -1408,9 +1408,9 @@ fn decode_side_tables(xcx: &ExtendedDecodeContext,
14081408 dcx. tcx . freevars . borrow_mut ( ) . insert ( id, fv_info) ;
14091409 }
14101410 c:: tag_table_tcache => {
1411- let tpbt = val_dsr. read_ty_param_bounds_and_ty ( xcx) ;
1411+ let pty = val_dsr. read_polytype ( xcx) ;
14121412 let lid = ast:: DefId { krate : ast:: LOCAL_CRATE , node : id } ;
1413- dcx. tcx . tcache . borrow_mut ( ) . insert ( lid, tpbt ) ;
1413+ dcx. tcx . tcache . borrow_mut ( ) . insert ( lid, pty ) ;
14141414 }
14151415 c:: tag_table_param_defs => {
14161416 let bounds = val_dsr. read_type_param_def ( xcx) ;
0 commit comments