@@ -68,7 +68,6 @@ type parameter).
68
68
69
69
import astconv :: { ast_conv, ast_ty_to_ty} ;
70
70
import collect :: { methods} ; // ccx.to_ty()
71
- import method :: { methods} ; // methods for method::lookup
72
71
import middle:: ty:: { tv_vid, vid} ;
73
72
import regionmanip :: { replace_bound_regions_in_fn_ty, region_of} ;
74
73
import rscope :: { anon_rscope, binding_rscope, empty_rscope, in_anon_rscope} ;
@@ -905,15 +904,8 @@ fn check_expr_with_unifier(fcx: @fn_ctxt,
905
904
opname : str , args : [ option < @ast:: expr > ] )
906
905
-> option < ( ty:: t , bool ) > {
907
906
let callee_id = ast_util:: op_expr_callee_id ( op_ex) ;
908
- let lkup = method:: lookup ( { fcx: fcx,
909
- expr: op_ex,
910
- self_expr: self_ex,
911
- borrow_scope: op_ex. id ,
912
- node_id: callee_id,
913
- m_name: @opname,
914
- self_ty: self_t,
915
- supplied_tps: [ ] ,
916
- include_private: false} ) ;
907
+ let lkup = method:: lookup ( fcx, op_ex, self_ex, op_ex. id ,
908
+ callee_id, @opname, self_t, [ ] , false ) ;
917
909
alt lkup. method ( ) {
918
910
some ( origin) {
919
911
let { fty: method_ty , bot: bot} = {
@@ -1629,15 +1621,9 @@ fn check_expr_with_unifier(fcx: @fn_ctxt,
1629
1621
// encloses the method call
1630
1622
let borrow_scope = fcx. tcx ( ) . region_map . get ( expr. id ) ;
1631
1623
1632
- let lkup = method:: lookup ( { fcx: fcx,
1633
- expr: expr,
1634
- self_expr: base,
1635
- borrow_scope: borrow_scope,
1636
- node_id: expr. id ,
1637
- m_name: field,
1638
- self_ty: expr_t,
1639
- supplied_tps: tps,
1640
- include_private: is_self_ref} ) ;
1624
+ let lkup = method:: lookup ( fcx, expr, base, borrow_scope,
1625
+ expr. id , field, expr_t, tps,
1626
+ is_self_ref) ;
1641
1627
alt lkup. method ( ) {
1642
1628
some ( entry) {
1643
1629
fcx. ccx . method_map . insert ( id, entry) ;
@@ -1686,15 +1672,8 @@ fn check_expr_with_unifier(fcx: @fn_ctxt,
1686
1672
1687
1673
let p_ty = fcx. expr_ty ( p) ;
1688
1674
1689
- let lkup = method:: lookup ( { fcx: fcx,
1690
- expr: p,
1691
- self_expr: p,
1692
- borrow_scope: expr. id ,
1693
- node_id: alloc_id,
1694
- m_name: @"alloc",
1695
- self_ty: p_ty,
1696
- supplied_tps: [ ] ,
1697
- include_private: false} ) ;
1675
+ let lkup = method:: lookup ( fcx, p, p, expr. id , alloc_id,
1676
+ @"alloc", p_ty, [ ] , false ) ;
1698
1677
alt lkup. method ( ) {
1699
1678
some ( entry) {
1700
1679
fcx. ccx . method_map . insert ( alloc_id, entry) ;
0 commit comments