Skip to content

Commit 607fa14

Browse files
brsongraydon
authored andcommitted
Rename incr_all_refcnts to take_ty, to match drop_ty
1 parent b0b72ab commit 607fa14

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/comp/middle/trans.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,7 @@ fn make_take_glue(@block_ctxt cx, ValueRef v, @ty.t t) -> result {
16681668

16691669
} else if (ty.type_is_structural(t)) {
16701670
ret iter_structural_ty(cx, v, t,
1671-
bind incr_all_refcnts(_, _, _));
1671+
bind take_ty(_, _, _));
16721672
}
16731673
ret res(cx, C_nil());
16741674
}
@@ -2315,7 +2315,7 @@ fn call_tydesc_glue(@block_ctxt cx, ValueRef v, @ty.t t, int field) {
23152315
call_tydesc_glue_full(td.bcx, v, td.val, field);
23162316
}
23172317

2318-
fn incr_all_refcnts(@block_ctxt cx,
2318+
fn take_ty(@block_ctxt cx,
23192319
ValueRef v,
23202320
@ty.t t) -> result {
23212321
if (!ty.type_is_scalar(t)) {
@@ -2397,15 +2397,15 @@ fn copy_ty(@block_ctxt cx,
23972397
ret res(cx, C_nil());
23982398

23992399
} else if (ty.type_is_boxed(t)) {
2400-
auto r = incr_all_refcnts(cx, src, t);
2400+
auto r = take_ty(cx, src, t);
24012401
if (action == DROP_EXISTING) {
24022402
r = drop_ty(r.bcx, r.bcx.build.Load(dst), t);
24032403
}
24042404
ret res(r.bcx, r.bcx.build.Store(src, dst));
24052405

24062406
} else if (ty.type_is_structural(t) ||
24072407
ty.type_has_dynamic_size(t)) {
2408-
auto r = incr_all_refcnts(cx, src, t);
2408+
auto r = take_ty(cx, src, t);
24092409
if (action == DROP_EXISTING) {
24102410
r = drop_ty(r.bcx, dst, t);
24112411
}

0 commit comments

Comments
 (0)