@@ -281,8 +281,15 @@ pub fn kind_for_unboxed_closure(ccx: &CrateContext, closure_id: ast::DefId)
281
281
282
282
pub fn decl_rust_fn < ' a , ' tcx > ( ccx : & CrateContext < ' a , ' tcx > ,
283
283
fn_ty : Ty < ' tcx > , name : & str ) -> ValueRef {
284
+ debug ! ( "decl_rust_fn(fn_ty={}, name={:?})" ,
285
+ fn_ty. repr( ccx. tcx( ) ) ,
286
+ name) ;
287
+
284
288
let fn_ty = monomorphize:: normalize_associated_type ( ccx. tcx ( ) , & fn_ty) ;
285
289
290
+ debug ! ( "decl_rust_fn: fn_ty={} (after normalized associated types)" ,
291
+ fn_ty. repr( ccx. tcx( ) ) ) ;
292
+
286
293
let function_type; // placeholder so that the memory ownership works out ok
287
294
288
295
let ( sig, abi, env) = match fn_ty. sty {
@@ -305,10 +312,12 @@ pub fn decl_rust_fn<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
305
312
let sig = ty:: erase_late_bound_regions ( ccx. tcx ( ) , sig) ;
306
313
let sig = ty:: Binder ( sig) ;
307
314
315
+ debug ! ( "decl_rust_fn: sig={} (after erasing regions)" ,
316
+ sig. repr( ccx. tcx( ) ) ) ;
317
+
308
318
let llfty = type_of_rust_fn ( ccx, env, & sig, abi) ;
309
319
310
- debug ! ( "decl_rust_fn(sig={}, type={})" ,
311
- sig. repr( ccx. tcx( ) ) ,
320
+ debug ! ( "decl_rust_fn: llfty={}" ,
312
321
ccx. tn( ) . type_to_string( llfty) ) ;
313
322
314
323
let llfn = decl_fn ( ccx, name, llvm:: CCallConv , llfty, sig. 0 . output /* (1) */ ) ;
0 commit comments