@@ -1027,7 +1027,7 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext,
1027
1027
} )
1028
1028
}
1029
1029
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) {
1031
1031
rbml_w. tag ( c:: tag_table_item_subst, |rbml_w| {
1032
1032
rbml_w. id ( id) ;
1033
1033
rbml_w. emit_substs ( ecx, & item_substs. substs ) ;
@@ -1051,7 +1051,7 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext,
1051
1051
var_id : var_id,
1052
1052
closure_expr_id : id
1053
1053
} ;
1054
- let upvar_capture = tcx. upvar_capture_map . borrow ( ) . get ( & upvar_id) . unwrap ( ) . clone ( ) ;
1054
+ let upvar_capture = tcx. tables . borrow ( ) . upvar_capture_map . get ( & upvar_id) . unwrap ( ) . clone ( ) ;
1055
1055
var_id. encode ( rbml_w) ;
1056
1056
upvar_capture. encode ( rbml_w) ;
1057
1057
} )
@@ -1074,19 +1074,19 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext,
1074
1074
}
1075
1075
1076
1076
let method_call = MethodCall :: expr ( id) ;
1077
- if let Some ( method) = tcx. method_map . borrow ( ) . get ( & method_call) {
1077
+ if let Some ( method) = tcx. tables . borrow ( ) . method_map . get ( & method_call) {
1078
1078
rbml_w. tag ( c:: tag_table_method_map, |rbml_w| {
1079
1079
rbml_w. id ( id) ;
1080
1080
encode_method_callee ( ecx, rbml_w, method_call. autoderef , method)
1081
1081
} )
1082
1082
}
1083
1083
1084
- if let Some ( adjustment) = tcx. adjustments . borrow ( ) . get ( & id) {
1084
+ if let Some ( adjustment) = tcx. tables . borrow ( ) . adjustments . get ( & id) {
1085
1085
match * adjustment {
1086
1086
ty:: AdjustDerefRef ( ref adj) => {
1087
1087
for autoderef in 0 ..adj. autoderefs {
1088
1088
let method_call = MethodCall :: autoderef ( id, autoderef as u32 ) ;
1089
- if let Some ( method) = tcx. method_map . borrow ( ) . get ( & method_call) {
1089
+ if let Some ( method) = tcx. tables . borrow ( ) . method_map . get ( & method_call) {
1090
1090
rbml_w. tag ( c:: tag_table_method_map, |rbml_w| {
1091
1091
rbml_w. id ( id) ;
1092
1092
encode_method_callee ( ecx, rbml_w,
@@ -1104,14 +1104,14 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext,
1104
1104
} )
1105
1105
}
1106
1106
1107
- if let Some ( closure_type) = tcx. closure_tys . borrow ( ) . get ( & ast_util:: local_def ( id) ) {
1107
+ if let Some ( closure_type) = tcx. tables . borrow ( ) . closure_tys . get ( & ast_util:: local_def ( id) ) {
1108
1108
rbml_w. tag ( c:: tag_table_closure_tys, |rbml_w| {
1109
1109
rbml_w. id ( id) ;
1110
1110
rbml_w. emit_closure_type ( ecx, closure_type) ;
1111
1111
} )
1112
1112
}
1113
1113
1114
- if let Some ( closure_kind) = tcx. closure_kinds . borrow ( ) . get ( & ast_util:: local_def ( id) ) {
1114
+ if let Some ( closure_kind) = tcx. tables . borrow ( ) . closure_kinds . get ( & ast_util:: local_def ( id) ) {
1115
1115
rbml_w. tag ( c:: tag_table_closure_kinds, |rbml_w| {
1116
1116
rbml_w. id ( id) ;
1117
1117
encode_closure_kind ( rbml_w, * closure_kind)
@@ -1630,7 +1630,7 @@ fn decode_side_tables(dcx: &DecodeContext,
1630
1630
let item_substs = ty:: ItemSubsts {
1631
1631
substs : val_dsr. read_substs ( dcx)
1632
1632
} ;
1633
- dcx. tcx . item_substs . borrow_mut ( ) . insert (
1633
+ dcx. tcx . tables . borrow_mut ( ) . item_substs . insert (
1634
1634
id, item_substs) ;
1635
1635
}
1636
1636
c:: tag_table_freevars => {
@@ -1646,7 +1646,7 @@ fn decode_side_tables(dcx: &DecodeContext,
1646
1646
closure_expr_id : id
1647
1647
} ;
1648
1648
let ub: ty:: UpvarCapture = Decodable :: decode ( val_dsr) . unwrap ( ) ;
1649
- dcx. tcx . upvar_capture_map . borrow_mut ( ) . insert ( upvar_id, ub. tr ( dcx) ) ;
1649
+ dcx. tcx . tables . borrow_mut ( ) . upvar_capture_map . insert ( upvar_id, ub. tr ( dcx) ) ;
1650
1650
}
1651
1651
c:: tag_table_tcache => {
1652
1652
let type_scheme = val_dsr. read_type_scheme ( dcx) ;
@@ -1663,22 +1663,22 @@ fn decode_side_tables(dcx: &DecodeContext,
1663
1663
expr_id : id,
1664
1664
autoderef : autoderef
1665
1665
} ;
1666
- dcx. tcx . method_map . borrow_mut ( ) . insert ( method_call, method) ;
1666
+ dcx. tcx . tables . borrow_mut ( ) . method_map . insert ( method_call, method) ;
1667
1667
}
1668
1668
c:: tag_table_adjustments => {
1669
1669
let adj: ty:: AutoAdjustment = val_dsr. read_auto_adjustment ( dcx) ;
1670
- dcx. tcx . adjustments . borrow_mut ( ) . insert ( id, adj) ;
1670
+ dcx. tcx . tables . borrow_mut ( ) . adjustments . insert ( id, adj) ;
1671
1671
}
1672
1672
c:: tag_table_closure_tys => {
1673
1673
let closure_ty =
1674
1674
val_dsr. read_closure_ty ( dcx) ;
1675
- dcx. tcx . closure_tys . borrow_mut ( ) . insert ( ast_util:: local_def ( id) ,
1675
+ dcx. tcx . tables . borrow_mut ( ) . closure_tys . insert ( ast_util:: local_def ( id) ,
1676
1676
closure_ty) ;
1677
1677
}
1678
1678
c:: tag_table_closure_kinds => {
1679
1679
let closure_kind =
1680
1680
val_dsr. read_closure_kind ( dcx) ;
1681
- dcx. tcx . closure_kinds . borrow_mut ( ) . insert ( ast_util:: local_def ( id) ,
1681
+ dcx. tcx . tables . borrow_mut ( ) . closure_kinds . insert ( ast_util:: local_def ( id) ,
1682
1682
closure_kind) ;
1683
1683
}
1684
1684
c:: tag_table_cast_kinds => {
0 commit comments