@@ -22,11 +22,7 @@ use syntax::ast;
22
22
use syntax:: ast_map:: path_name;
23
23
use syntax:: ast_util:: local_def;
24
24
25
- // `translate` will be true if this function is allowed to translate the
26
- // item and false otherwise. Currently, this parameter is set to false when
27
- // translating default methods.
28
- pub fn maybe_instantiate_inline ( ccx : @mut CrateContext , fn_id : ast:: def_id ,
29
- translate : bool )
25
+ pub fn maybe_instantiate_inline ( ccx : @mut CrateContext , fn_id : ast:: def_id )
30
26
-> ast:: def_id {
31
27
let _icx = push_ctxt ( "maybe_instantiate_inline" ) ;
32
28
match ccx. external . find ( & fn_id) {
@@ -59,7 +55,7 @@ pub fn maybe_instantiate_inline(ccx: @mut CrateContext, fn_id: ast::def_id,
59
55
csearch:: found( ast:: ii_item( item) ) => {
60
56
ccx. external . insert ( fn_id, Some ( item. id ) ) ;
61
57
ccx. stats . n_inlines += 1 ;
62
- if translate { trans_item ( ccx, item) ; }
58
+ trans_item ( ccx, item) ;
63
59
local_def ( item. id )
64
60
}
65
61
csearch:: found( ast:: ii_foreign( item) ) => {
@@ -81,19 +77,19 @@ pub fn maybe_instantiate_inline(ccx: @mut CrateContext, fn_id: ast::def_id,
81
77
_ => ccx. sess . bug ( "maybe_instantiate_inline: item has a \
82
78
non-enum parent")
83
79
}
84
- if translate { trans_item( ccx, item) ; }
80
+ trans_item( ccx, item) ;
85
81
local_def( my_id)
86
82
}
87
83
csearch:: found_parent( _, _) => {
88
84
ccx. sess . bug ( "maybe_get_item_ast returned a found_parent \
89
85
with a non-item parent") ;
90
86
}
91
- csearch:: found( ast:: ii_method( impl_did, mth) ) => {
87
+ csearch:: found( ast:: ii_method( impl_did, is_provided , mth) ) => {
92
88
ccx. stats . n_inlines += 1 ;
93
89
ccx. external . insert ( fn_id, Some ( mth. id ) ) ;
94
90
// If this is a default method, we can't look up the
95
91
// impl type. But we aren't going to translate anyways, so don't.
96
- if !translate { return local_def ( mth. id ) ; }
92
+ if is_provided { return local_def ( mth. id ) ; }
97
93
98
94
let impl_tpt = ty:: lookup_item_type ( ccx. tcx , impl_did) ;
99
95
let num_type_params =
0 commit comments