@@ -1027,7 +1027,7 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext,
10271027 } )
10281028 }
10291029
1030- if let Some ( item_substs) = tcx. item_substs . borrow ( ) . get ( & id) {
1030+ if let Some ( item_substs) = tcx. tables . borrow ( ) . item_substs . get ( & id) {
10311031 rbml_w. tag ( c:: tag_table_item_subst, |rbml_w| {
10321032 rbml_w. id ( id) ;
10331033 rbml_w. emit_substs ( ecx, & item_substs. substs ) ;
@@ -1051,7 +1051,12 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext,
10511051 var_id : var_id,
10521052 closure_expr_id : id
10531053 } ;
1054- let upvar_capture = tcx. upvar_capture_map . borrow ( ) . get ( & upvar_id) . unwrap ( ) . clone ( ) ;
1054+ let upvar_capture = tcx. tables
1055+ . borrow ( )
1056+ . upvar_capture_map
1057+ . get ( & upvar_id)
1058+ . unwrap ( )
1059+ . clone ( ) ;
10551060 var_id. encode ( rbml_w) ;
10561061 upvar_capture. encode ( rbml_w) ;
10571062 } )
@@ -1074,19 +1079,19 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext,
10741079 }
10751080
10761081 let method_call = MethodCall :: expr ( id) ;
1077- if let Some ( method) = tcx. method_map . borrow ( ) . get ( & method_call) {
1082+ if let Some ( method) = tcx. tables . borrow ( ) . method_map . get ( & method_call) {
10781083 rbml_w. tag ( c:: tag_table_method_map, |rbml_w| {
10791084 rbml_w. id ( id) ;
10801085 encode_method_callee ( ecx, rbml_w, method_call. autoderef , method)
10811086 } )
10821087 }
10831088
1084- if let Some ( adjustment) = tcx. adjustments . borrow ( ) . get ( & id) {
1089+ if let Some ( adjustment) = tcx. tables . borrow ( ) . adjustments . get ( & id) {
10851090 match * adjustment {
10861091 ty:: AdjustDerefRef ( ref adj) => {
10871092 for autoderef in 0 ..adj. autoderefs {
10881093 let method_call = MethodCall :: autoderef ( id, autoderef as u32 ) ;
1089- if let Some ( method) = tcx. method_map . borrow ( ) . get ( & method_call) {
1094+ if let Some ( method) = tcx. tables . borrow ( ) . method_map . get ( & method_call) {
10901095 rbml_w. tag ( c:: tag_table_method_map, |rbml_w| {
10911096 rbml_w. id ( id) ;
10921097 encode_method_callee ( ecx, rbml_w,
@@ -1104,14 +1109,14 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext,
11041109 } )
11051110 }
11061111
1107- if let Some ( closure_type) = tcx. closure_tys . borrow ( ) . get ( & ast_util:: local_def ( id) ) {
1112+ if let Some ( closure_type) = tcx. tables . borrow ( ) . closure_tys . get ( & ast_util:: local_def ( id) ) {
11081113 rbml_w. tag ( c:: tag_table_closure_tys, |rbml_w| {
11091114 rbml_w. id ( id) ;
11101115 rbml_w. emit_closure_type ( ecx, closure_type) ;
11111116 } )
11121117 }
11131118
1114- if let Some ( closure_kind) = tcx. closure_kinds . borrow ( ) . get ( & ast_util:: local_def ( id) ) {
1119+ if let Some ( closure_kind) = tcx. tables . borrow ( ) . closure_kinds . get ( & ast_util:: local_def ( id) ) {
11151120 rbml_w. tag ( c:: tag_table_closure_kinds, |rbml_w| {
11161121 rbml_w. id ( id) ;
11171122 encode_closure_kind ( rbml_w, * closure_kind)
@@ -1630,7 +1635,7 @@ fn decode_side_tables(dcx: &DecodeContext,
16301635 let item_substs = ty:: ItemSubsts {
16311636 substs : val_dsr. read_substs ( dcx)
16321637 } ;
1633- dcx. tcx . item_substs . borrow_mut ( ) . insert (
1638+ dcx. tcx . tables . borrow_mut ( ) . item_substs . insert (
16341639 id, item_substs) ;
16351640 }
16361641 c:: tag_table_freevars => {
@@ -1646,7 +1651,7 @@ fn decode_side_tables(dcx: &DecodeContext,
16461651 closure_expr_id : id
16471652 } ;
16481653 let ub: ty:: UpvarCapture = Decodable :: decode ( val_dsr) . unwrap ( ) ;
1649- dcx. tcx . upvar_capture_map . borrow_mut ( ) . insert ( upvar_id, ub. tr ( dcx) ) ;
1654+ dcx. tcx . tables . borrow_mut ( ) . upvar_capture_map . insert ( upvar_id, ub. tr ( dcx) ) ;
16501655 }
16511656 c:: tag_table_tcache => {
16521657 let type_scheme = val_dsr. read_type_scheme ( dcx) ;
@@ -1663,22 +1668,22 @@ fn decode_side_tables(dcx: &DecodeContext,
16631668 expr_id : id,
16641669 autoderef : autoderef
16651670 } ;
1666- dcx. tcx . method_map . borrow_mut ( ) . insert ( method_call, method) ;
1671+ dcx. tcx . tables . borrow_mut ( ) . method_map . insert ( method_call, method) ;
16671672 }
16681673 c:: tag_table_adjustments => {
16691674 let adj: ty:: AutoAdjustment = val_dsr. read_auto_adjustment ( dcx) ;
1670- dcx. tcx . adjustments . borrow_mut ( ) . insert ( id, adj) ;
1675+ dcx. tcx . tables . borrow_mut ( ) . adjustments . insert ( id, adj) ;
16711676 }
16721677 c:: tag_table_closure_tys => {
16731678 let closure_ty =
16741679 val_dsr. read_closure_ty ( dcx) ;
1675- dcx. tcx . closure_tys . borrow_mut ( ) . insert ( ast_util:: local_def ( id) ,
1680+ dcx. tcx . tables . borrow_mut ( ) . closure_tys . insert ( ast_util:: local_def ( id) ,
16761681 closure_ty) ;
16771682 }
16781683 c:: tag_table_closure_kinds => {
16791684 let closure_kind =
16801685 val_dsr. read_closure_kind ( dcx) ;
1681- dcx. tcx . closure_kinds . borrow_mut ( ) . insert ( ast_util:: local_def ( id) ,
1686+ dcx. tcx . tables . borrow_mut ( ) . closure_kinds . insert ( ast_util:: local_def ( id) ,
16821687 closure_kind) ;
16831688 }
16841689 c:: tag_table_cast_kinds => {
0 commit comments