@@ -246,7 +246,8 @@ fn get_extern_rust_fn(ccx: &CrateContext, inputs: &[ty::t], output: ty::t,
246
246
pub fn decl_rust_fn ( ccx : & CrateContext , has_env : bool ,
247
247
inputs : & [ ty:: t ] , output : ty:: t ,
248
248
name : & str ) -> ValueRef {
249
- use middle:: ty:: { FreeRegion , BrAnon , ReFree , ReLateBound } ;
249
+ use middle:: ty:: { BrAnon , ReLateBound } ;
250
+
250
251
let llfty = type_of_rust_fn ( ccx, has_env, inputs, output) ;
251
252
let llfn = decl_cdecl_fn ( ccx. llmod , name, llfty, output) ;
252
253
@@ -270,8 +271,7 @@ pub fn decl_rust_fn(ccx: &CrateContext, has_env: bool,
270
271
// When a reference in an argument has no named lifetime, it's
271
272
// impossible for that reference to escape this function(ie, be
272
273
// returned).
273
- ty:: ty_rptr( ReFree ( FreeRegion { scope_id : _, bound_region : BrAnon ( _) } ) , _) |
274
- ty:: ty_rptr( ReLateBound ( _, BrAnon ( _) ) , _) => {
274
+ ty:: ty_rptr( ReLateBound ( _, BrAnon ( _) ) , _) => {
275
275
debug ! ( "marking argument of {} as nocapture because of anonymous lifetime" , name) ;
276
276
unsafe {
277
277
llvm:: LLVMAddAttribute ( llarg, lib:: llvm:: NoCaptureAttribute as c_uint ) ;
0 commit comments