@@ -20,7 +20,7 @@ use middle::def;
20
20
use metadata:: encoder as e;
21
21
use middle:: region;
22
22
use metadata:: tydecode;
23
- use metadata:: tydecode:: { DefIdSource , NominalType , TypeWithId , TypeParameter } ;
23
+ use metadata:: tydecode:: { DefIdSource , NominalType , TypeWithId } ;
24
24
use metadata:: tydecode:: { RegionParameter , ClosureSource } ;
25
25
use metadata:: tyencode;
26
26
use middle:: cast;
@@ -346,13 +346,6 @@ impl<D:serialize::Decoder> def_id_decoder_helpers for D
346
346
// ______________________________________________________________________
347
347
// Encoding and decoding the AST itself
348
348
//
349
- // The hard work is done by an autogenerated module astencode_gen. To
350
- // regenerate astencode_gen, run src/etc/gen-astencode. It will
351
- // replace astencode_gen with a dummy file and regenerate its
352
- // contents. If you get compile errors, the dummy file
353
- // remains---resolve the errors and then rerun astencode_gen.
354
- // Annoying, I know, but hopefully only temporary.
355
- //
356
349
// When decoding, we have to renumber the AST so that the node ids that
357
350
// appear within are disjoint from the node ids in our existing ASTs.
358
351
// We also have to adjust the spans: for now we just insert a dummy span,
@@ -656,35 +649,6 @@ impl<'a, 'tcx> read_method_callee_helper<'tcx> for reader::Decoder<'a> {
656
649
}
657
650
}
658
651
659
- impl < ' tcx > tr for MethodOrigin < ' tcx > {
660
- fn tr ( & self , dcx : & DecodeContext ) -> MethodOrigin < ' tcx > {
661
- match * self {
662
- ty:: MethodStatic ( did) => ty:: MethodStatic ( did. tr ( dcx) ) ,
663
- ty:: MethodStaticClosure ( did) => {
664
- ty:: MethodStaticClosure ( did. tr ( dcx) )
665
- }
666
- ty:: MethodTypeParam ( ref mp) => {
667
- ty:: MethodTypeParam (
668
- ty:: MethodParam {
669
- // def-id is already translated when we read it out
670
- trait_ref : mp. trait_ref . clone ( ) ,
671
- method_num : mp. method_num ,
672
- impl_def_id : mp. impl_def_id . tr ( dcx) ,
673
- }
674
- )
675
- }
676
- ty:: MethodTraitObject ( ref mo) => {
677
- ty:: MethodTraitObject (
678
- ty:: MethodObject {
679
- trait_ref : mo. trait_ref . clone ( ) ,
680
- .. * mo
681
- }
682
- )
683
- }
684
- }
685
- }
686
- }
687
-
688
652
pub fn encode_closure_kind ( ebml_w : & mut Encoder , kind : ty:: ClosureKind ) {
689
653
kind. encode ( ebml_w) . unwrap ( ) ;
690
654
}
@@ -1473,10 +1437,10 @@ impl<'a, 'tcx> rbml_decoder_decoder_helpers<'tcx> for reader::Decoder<'a> {
1473
1437
-> subst:: Substs < ' tcx > {
1474
1438
self . read_opaque ( |this, doc| {
1475
1439
Ok ( tydecode:: parse_substs_data ( doc. data ,
1476
- dcx. cdata . cnum ,
1477
- doc. start ,
1478
- dcx. tcx ,
1479
- |s, a| this. convert_def_id ( dcx, s, a) ) )
1440
+ dcx. cdata . cnum ,
1441
+ doc. start ,
1442
+ dcx. tcx ,
1443
+ |s, a| this. convert_def_id ( dcx, s, a) ) )
1480
1444
} ) . unwrap ( )
1481
1445
}
1482
1446
@@ -1617,7 +1581,7 @@ impl<'a, 'tcx> rbml_decoder_decoder_helpers<'tcx> for reader::Decoder<'a> {
1617
1581
-> ast:: DefId {
1618
1582
let r = match source {
1619
1583
NominalType | TypeWithId | RegionParameter => dcx. tr_def_id ( did) ,
1620
- TypeParameter | ClosureSource => dcx. tr_intern_def_id ( did)
1584
+ ClosureSource => dcx. tr_intern_def_id ( did)
1621
1585
} ;
1622
1586
debug ! ( "convert_def_id(source={:?}, did={:?})={:?}" , source, did, r) ;
1623
1587
return r;
0 commit comments