@@ -510,27 +510,6 @@ fn check_fn<'a>(ccx: &'a CrateCtxt<'a>,
510
510
fcx
511
511
}
512
512
513
- pub fn check_no_duplicate_fields ( tcx : & ty:: ctxt ,
514
- fields : Vec < ( ast:: Ident , Span ) > ) {
515
- let mut field_names = HashMap :: new ( ) ;
516
-
517
- for p in fields. iter ( ) {
518
- let ( id, sp) = * p;
519
- let orig_sp = field_names. find ( & id) . map ( |x| * x) ;
520
- match orig_sp {
521
- Some ( orig_sp) => {
522
- tcx. sess . span_err ( sp, format ! ( "duplicate field name {} in record type declaration" ,
523
- token:: get_ident( id) ) ) ;
524
- tcx. sess . span_note ( orig_sp, "first declaration of this field occurred here" ) ;
525
- break ;
526
- }
527
- None => {
528
- field_names. insert ( id, sp) ;
529
- }
530
- }
531
- }
532
- }
533
-
534
513
pub fn check_struct ( ccx : & CrateCtxt , id : ast:: NodeId , span : Span ) {
535
514
let tcx = ccx. tcx ;
536
515
@@ -1010,10 +989,6 @@ impl<'a> FnCtxt<'a> {
1010
989
}
1011
990
}
1012
991
1013
- pub fn block_region ( & self ) -> ty:: Region {
1014
- ty:: ReScope ( self . region_lb . get ( ) )
1015
- }
1016
-
1017
992
#[ inline]
1018
993
pub fn write_ty ( & self , node_id : ast:: NodeId , ty : ty:: t ) {
1019
994
debug ! ( "write_ty({}, {}) in fcx {}" ,
@@ -1100,18 +1075,6 @@ impl<'a> FnCtxt<'a> {
1100
1075
}
1101
1076
}
1102
1077
1103
- pub fn node_ty_substs ( & self , id : ast:: NodeId ) -> ty:: substs {
1104
- match self . inh . node_type_substs . borrow ( ) . find ( & id) {
1105
- Some ( ts) => ( * ts) . clone ( ) ,
1106
- None => {
1107
- self . tcx ( ) . sess . bug (
1108
- format ! ( "no type substs for node {}: {} in fcx {}" ,
1109
- id, self . tcx( ) . map. node_to_str( id) ,
1110
- self . tag( ) ) ) ;
1111
- }
1112
- }
1113
- }
1114
-
1115
1078
pub fn method_ty_substs ( & self , id : ast:: NodeId ) -> ty:: substs {
1116
1079
match self . inh . method_map . borrow ( ) . find ( & MethodCall :: expr ( id) ) {
1117
1080
Some ( method) => method. substs . clone ( ) ,
@@ -1167,11 +1130,6 @@ impl<'a> FnCtxt<'a> {
1167
1130
}
1168
1131
}
1169
1132
1170
- pub fn can_mk_assignty ( & self , sub : ty:: t , sup : ty:: t )
1171
- -> Result < ( ) , ty:: type_err > {
1172
- infer:: can_mk_coercety ( self . infcx ( ) , sub, sup)
1173
- }
1174
-
1175
1133
pub fn mk_eqty ( & self ,
1176
1134
a_is_expected : bool ,
1177
1135
origin : infer:: TypeOrigin ,
@@ -3300,10 +3258,6 @@ pub fn check_block_no_value(fcx: &FnCtxt, blk: &ast::Block) {
3300
3258
}
3301
3259
}
3302
3260
3303
- pub fn check_block ( fcx0 : & FnCtxt , blk : & ast:: Block ) {
3304
- check_block_with_expected ( fcx0, blk, None )
3305
- }
3306
-
3307
3261
pub fn check_block_with_expected ( fcx : & FnCtxt ,
3308
3262
blk : & ast:: Block ,
3309
3263
expected : Option < ty:: t > ) {
0 commit comments