@@ -41,7 +41,6 @@ use syntax;
41
41
use std:: cell:: Cell ;
42
42
use std:: io:: SeekFrom ;
43
43
use std:: io:: prelude:: * ;
44
- use std:: rc:: Rc ;
45
44
use std:: fmt:: Debug ;
46
45
47
46
use rbml:: reader;
@@ -890,7 +889,7 @@ impl<'a, 'tcx> rbml_writer_helpers<'tcx> for Encoder<'a> {
890
889
this. emit_enum_variant ( "MethodTypeParam" , 2 , 1 , |this| {
891
890
this. emit_struct ( "MethodParam" , 2 , |this| {
892
891
try!( this. emit_struct_field ( "trait_ref" , 0 , |this| {
893
- Ok ( this. emit_trait_ref ( ecx, & * p. trait_ref ) )
892
+ Ok ( this. emit_trait_ref ( ecx, & p. trait_ref ) )
894
893
} ) ) ;
895
894
try!( this. emit_struct_field ( "method_num" , 0 , |this| {
896
895
this. emit_uint ( p. method_num )
@@ -914,7 +913,7 @@ impl<'a, 'tcx> rbml_writer_helpers<'tcx> for Encoder<'a> {
914
913
this. emit_enum_variant ( "MethodTraitObject" , 3 , 1 , |this| {
915
914
this. emit_struct ( "MethodObject" , 2 , |this| {
916
915
try!( this. emit_struct_field ( "trait_ref" , 0 , |this| {
917
- Ok ( this. emit_trait_ref ( ecx, & * o. trait_ref ) )
916
+ Ok ( this. emit_trait_ref ( ecx, & o. trait_ref ) )
918
917
} ) ) ;
919
918
try!( this. emit_struct_field ( "object_trait_id" , 0 , |this| {
920
919
Ok ( this. emit_def_id ( o. object_trait_id ) )
@@ -1208,7 +1207,7 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext,
1208
1207
if let Some ( trait_ref) = tcx. object_cast_map . borrow ( ) . get ( & id) {
1209
1208
rbml_w. tag ( c:: tag_table_object_cast_map, |rbml_w| {
1210
1209
rbml_w. id ( id) ;
1211
- rbml_w. emit_trait_ref ( ecx, & * trait_ref. 0 ) ;
1210
+ rbml_w. emit_trait_ref ( ecx, & trait_ref. 0 ) ;
1212
1211
} )
1213
1212
}
1214
1213
@@ -1275,7 +1274,7 @@ trait rbml_decoder_decoder_helpers<'tcx> {
1275
1274
fn read_ty < ' a , ' b > ( & mut self , dcx : & DecodeContext < ' a , ' b , ' tcx > ) -> Ty < ' tcx > ;
1276
1275
fn read_tys < ' a , ' b > ( & mut self , dcx : & DecodeContext < ' a , ' b , ' tcx > ) -> Vec < Ty < ' tcx > > ;
1277
1276
fn read_trait_ref < ' a , ' b > ( & mut self , dcx : & DecodeContext < ' a , ' b , ' tcx > )
1278
- -> Rc < ty:: TraitRef < ' tcx > > ;
1277
+ -> ty:: TraitRef < ' tcx > ;
1279
1278
fn read_poly_trait_ref < ' a , ' b > ( & mut self , dcx : & DecodeContext < ' a , ' b , ' tcx > )
1280
1279
-> ty:: PolyTraitRef < ' tcx > ;
1281
1280
fn read_type_param_def < ' a , ' b > ( & mut self , dcx : & DecodeContext < ' a , ' b , ' tcx > )
@@ -1469,7 +1468,7 @@ impl<'a, 'tcx> rbml_decoder_decoder_helpers<'tcx> for reader::Decoder<'a> {
1469
1468
}
1470
1469
1471
1470
fn read_trait_ref < ' b , ' c > ( & mut self , dcx : & DecodeContext < ' b , ' c , ' tcx > )
1472
- -> Rc < ty:: TraitRef < ' tcx > > {
1471
+ -> ty:: TraitRef < ' tcx > {
1473
1472
self . read_opaque ( |this, doc| {
1474
1473
let ty = tydecode:: parse_trait_ref_data (
1475
1474
doc. data ,
0 commit comments