Skip to content

Commit e4bb2d7

Browse files
committed
core: Rename vec::tail_n to vec::tailn to match other fns
1 parent a0f0a70 commit e4bb2d7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/libcore/vec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export to_mut;
1414
export from_mut;
1515
export head;
1616
export tail;
17-
export tail_n;
17+
export tailn;
1818
export init;
1919
export last;
2020
export last_opt;
@@ -180,7 +180,7 @@ fn tail<T: copy>(v: [const T]) -> [T] {
180180
}
181181

182182
#[doc = "Returns all but the first `n` elements of a vector"]
183-
fn tail_n<T: copy>(v: [const T], n: uint) -> [T] {
183+
fn tailn<T: copy>(v: [const T], n: uint) -> [T] {
184184
slice(v, n, len(v))
185185
}
186186

src/rustc/middle/trans/impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ fn trans_vtable_callee(bcx: block, env: callee_env, dict: ValueRef,
126126
if (*method.tps).len() > 0u || ty::type_has_params(fty) {
127127
let tydescs = [], tis = [];
128128
let tptys = node_id_type_params(bcx, callee_id);
129-
for t in vec::tail_n(tptys, tptys.len() - (*method.tps).len()) {
129+
for t in vec::tailn(tptys, tptys.len() - (*method.tps).len()) {
130130
let ti = none;
131131
let td = get_tydesc(bcx, t, true, ti);
132132
tis += [ti];

src/rustc/middle/typeck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ fn fixup_self_in_method_ty(cx: ty::ctxt, mty: ty::t, m_substs: [ty::t],
757757
let method_n_tps =
758758
(vec::len(m_substs) - vec::len(tps)) as int;
759759
if method_n_tps > 0 {
760-
substs += vec::tail_n(m_substs, vec::len(m_substs)
760+
substs += vec::tailn(m_substs, vec::len(m_substs)
761761
- (method_n_tps as uint));
762762
}
763763
// And then instantiate the self type using all those.

0 commit comments

Comments
 (0)