remove the code that encodes type parameter defs
there are no type parameter defs in the relevant range
This commit is contained in:
parent
8557cb47cb
commit
db817ceda4
2 changed files with 1 additions and 32 deletions
|
@ -125,9 +125,7 @@ enum_from_u32! {
|
|||
tag_table_node_type = 0x57,
|
||||
tag_table_item_subst = 0x58,
|
||||
tag_table_freevars = 0x59,
|
||||
// GAP 0x5a
|
||||
tag_table_param_defs = 0x5b,
|
||||
// GAP 0x5c, 0x5d, 0x5e
|
||||
// GAP 0x5a, 0x5b, 0x5c, 0x5d, 0x5e
|
||||
tag_table_method_map = 0x5f,
|
||||
// GAP 0x60
|
||||
tag_table_adjustments = 0x61,
|
||||
|
|
|
@ -611,8 +611,6 @@ trait rbml_writer_helpers<'tcx> {
|
|||
fn emit_region(&mut self, ecx: &e::EncodeContext, r: ty::Region);
|
||||
fn emit_ty<'a>(&mut self, ecx: &e::EncodeContext<'a, 'tcx>, ty: Ty<'tcx>);
|
||||
fn emit_tys<'a>(&mut self, ecx: &e::EncodeContext<'a, 'tcx>, tys: &[Ty<'tcx>]);
|
||||
fn emit_type_param_def<'a>(&mut self, ecx: &e::EncodeContext<'a, 'tcx>,
|
||||
type_param_def: &ty::TypeParameterDef<'tcx>);
|
||||
fn emit_predicate<'a>(&mut self, ecx: &e::EncodeContext<'a, 'tcx>,
|
||||
predicate: &ty::Predicate<'tcx>);
|
||||
fn emit_trait_ref<'a>(&mut self, ecx: &e::EncodeContext<'a, 'tcx>,
|
||||
|
@ -657,15 +655,6 @@ impl<'a, 'tcx> rbml_writer_helpers<'tcx> for Encoder<'a> {
|
|||
self.emit_opaque(|this| Ok(e::write_trait_ref(ecx, this, trait_ref)));
|
||||
}
|
||||
|
||||
fn emit_type_param_def<'b>(&mut self, ecx: &e::EncodeContext<'b, 'tcx>,
|
||||
type_param_def: &ty::TypeParameterDef<'tcx>) {
|
||||
self.emit_opaque(|this| {
|
||||
Ok(tyencode::enc_type_param_def(this,
|
||||
&ecx.ty_str_ctxt(),
|
||||
type_param_def))
|
||||
});
|
||||
}
|
||||
|
||||
fn emit_predicate<'b>(&mut self, ecx: &e::EncodeContext<'b, 'tcx>,
|
||||
predicate: &ty::Predicate<'tcx>) {
|
||||
self.emit_opaque(|this| {
|
||||
|
@ -894,13 +883,6 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext,
|
|||
}
|
||||
}
|
||||
|
||||
if let Some(type_param_def) = tcx.ty_param_defs.borrow().get(&id) {
|
||||
rbml_w.tag(c::tag_table_param_defs, |rbml_w| {
|
||||
rbml_w.id(id);
|
||||
rbml_w.emit_type_param_def(ecx, type_param_def)
|
||||
})
|
||||
}
|
||||
|
||||
let method_call = ty::MethodCall::expr(id);
|
||||
if let Some(method) = tcx.tables.borrow().method_map.get(&method_call) {
|
||||
rbml_w.tag(c::tag_table_method_map, |rbml_w| {
|
||||
|
@ -985,8 +967,6 @@ trait rbml_decoder_decoder_helpers<'tcx> {
|
|||
-> ty::TraitRef<'tcx>;
|
||||
fn read_poly_trait_ref<'a, 'b>(&mut self, dcx: &DecodeContext<'a, 'b, 'tcx>)
|
||||
-> ty::PolyTraitRef<'tcx>;
|
||||
fn read_type_param_def<'a, 'b>(&mut self, dcx: &DecodeContext<'a, 'b, 'tcx>)
|
||||
-> ty::TypeParameterDef<'tcx>;
|
||||
fn read_predicate<'a, 'b>(&mut self, dcx: &DecodeContext<'a, 'b, 'tcx>)
|
||||
-> ty::Predicate<'tcx>;
|
||||
fn read_existential_bounds<'a, 'b>(&mut self, dcx: &DecodeContext<'a, 'b, 'tcx>)
|
||||
|
@ -1105,11 +1085,6 @@ impl<'a, 'tcx> rbml_decoder_decoder_helpers<'tcx> for reader::Decoder<'a> {
|
|||
ty::Binder(self.read_ty_encoded(dcx, |decoder| decoder.parse_trait_ref()))
|
||||
}
|
||||
|
||||
fn read_type_param_def<'b, 'c>(&mut self, dcx: &DecodeContext<'b, 'c, 'tcx>)
|
||||
-> ty::TypeParameterDef<'tcx> {
|
||||
self.read_ty_encoded(dcx, |decoder| decoder.parse_type_param_def())
|
||||
}
|
||||
|
||||
fn read_predicate<'b, 'c>(&mut self, dcx: &DecodeContext<'b, 'c, 'tcx>)
|
||||
-> ty::Predicate<'tcx>
|
||||
{
|
||||
|
@ -1351,10 +1326,6 @@ fn decode_side_tables(dcx: &DecodeContext,
|
|||
let ub = val_dsr.read_upvar_capture(dcx);
|
||||
dcx.tcx.tables.borrow_mut().upvar_capture_map.insert(upvar_id, ub);
|
||||
}
|
||||
c::tag_table_param_defs => {
|
||||
let bounds = val_dsr.read_type_param_def(dcx);
|
||||
dcx.tcx.ty_param_defs.borrow_mut().insert(id, bounds);
|
||||
}
|
||||
c::tag_table_method_map => {
|
||||
let (autoderef, method) = val_dsr.read_method_callee(dcx);
|
||||
let method_call = ty::MethodCall {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue