Skip to content

Commit eb0c64c

Browse files
committed
---
yaml --- r: 105176 b: refs/heads/snap-stage3 c: b8ed136 h: refs/heads/master v: v3
1 parent 26be17b commit eb0c64c

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 62f1d68439dcfd509eaca29887afa97f22938373
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 7febdb7b15681a6a70da191128a9552f35ed5644
4+
refs/heads/snap-stage3: b8ed13686ad1f883f3de1e7fa5ba5bf9f92ae5d2
55
refs/heads/try: db814977d07bd798feb24f6b74c00800ef458a13
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/trans/base.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ fn get_extern_rust_fn(ccx: &CrateContext, inputs: &[ty::t], output: ty::t,
246246
pub fn decl_rust_fn(ccx: &CrateContext, has_env: bool,
247247
inputs: &[ty::t], output: ty::t,
248248
name: &str) -> ValueRef {
249-
use middle::ty::{FreeRegion, BrAnon, ReFree, ReLateBound};
249+
use middle::ty::{BrAnon, ReLateBound};
250+
250251
let llfty = type_of_rust_fn(ccx, has_env, inputs, output);
251252
let llfn = decl_cdecl_fn(ccx.llmod, name, llfty, output);
252253

@@ -270,8 +271,7 @@ pub fn decl_rust_fn(ccx: &CrateContext, has_env: bool,
270271
// When a reference in an argument has no named lifetime, it's
271272
// impossible for that reference to escape this function(ie, be
272273
// returned).
273-
ty::ty_rptr(ReFree(FreeRegion { scope_id: _, bound_region: BrAnon(_) }), _) |
274-
ty::ty_rptr(ReLateBound(_, BrAnon(_)), _) => {
274+
ty::ty_rptr(ReLateBound(_, BrAnon(_)), _) => {
275275
debug!("marking argument of {} as nocapture because of anonymous lifetime", name);
276276
unsafe {
277277
llvm::LLVMAddAttribute(llarg, lib::llvm::NoCaptureAttribute as c_uint);

branches/snap-stage3/src/librustc/middle/trans/callee.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -708,8 +708,9 @@ pub fn trans_call_inner<'a>(
708708

709709
debug!("trans_callee_inner: first_arg_offset={}", first_arg_offset);
710710

711-
for (idx, &t) in ty::ty_fn_args(callee_ty).iter().enumerate().map(|(i, v)| (i+first_arg_offset, v)) {
712-
use middle::ty::{FreeRegion, BrAnon, ReFree, ReLateBound};
711+
for (idx, &t) in ty::ty_fn_args(callee_ty).iter().enumerate()
712+
.map(|(i, v)| (i+first_arg_offset, v)) {
713+
use middle::ty::{BrAnon, ReLateBound};
713714
if !type_is_immediate(ccx, t) {
714715
// if it's not immediate, we have a program-invisible pointer,
715716
// which it can't possibly capture
@@ -720,10 +721,9 @@ pub fn trans_call_inner<'a>(
720721

721722
let t_ = ty::get(t);
722723
match t_.sty {
723-
ty::ty_rptr(ReFree(FreeRegion { scope_id: _, bound_region: BrAnon(_) }), _) |
724-
ty::ty_rptr(ReLateBound(_, BrAnon(_)), _) => {
725-
726-
debug!("trans_callee_inner: argument {} nocapture because of anonymous lifetime", idx);
724+
ty::ty_rptr(ReLateBound(_, BrAnon(_)), _) => {
725+
debug!("trans_callee_inner: argument {} nocapture because \
726+
of anonymous lifetime", idx);
727727
attrs.push((idx, NoCaptureAttribute));
728728
},
729729
_ => { }

0 commit comments

Comments
 (0)