mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-10 05:53:10 +00:00
core: Rename vec::tail_n to vec::tailn to match other fns
This commit is contained in:
parent
a0f0a704b0
commit
e4bb2d707f
@ -14,7 +14,7 @@ export to_mut;
|
||||
export from_mut;
|
||||
export head;
|
||||
export tail;
|
||||
export tail_n;
|
||||
export tailn;
|
||||
export init;
|
||||
export last;
|
||||
export last_opt;
|
||||
@ -180,7 +180,7 @@ fn tail<T: copy>(v: [const T]) -> [T] {
|
||||
}
|
||||
|
||||
#[doc = "Returns all but the first `n` elements of a vector"]
|
||||
fn tail_n<T: copy>(v: [const T], n: uint) -> [T] {
|
||||
fn tailn<T: copy>(v: [const T], n: uint) -> [T] {
|
||||
slice(v, n, len(v))
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ fn trans_vtable_callee(bcx: block, env: callee_env, dict: ValueRef,
|
||||
if (*method.tps).len() > 0u || ty::type_has_params(fty) {
|
||||
let tydescs = [], tis = [];
|
||||
let tptys = node_id_type_params(bcx, callee_id);
|
||||
for t in vec::tail_n(tptys, tptys.len() - (*method.tps).len()) {
|
||||
for t in vec::tailn(tptys, tptys.len() - (*method.tps).len()) {
|
||||
let ti = none;
|
||||
let td = get_tydesc(bcx, t, true, ti);
|
||||
tis += [ti];
|
||||
|
@ -757,7 +757,7 @@ fn fixup_self_in_method_ty(cx: ty::ctxt, mty: ty::t, m_substs: [ty::t],
|
||||
let method_n_tps =
|
||||
(vec::len(m_substs) - vec::len(tps)) as int;
|
||||
if method_n_tps > 0 {
|
||||
substs += vec::tail_n(m_substs, vec::len(m_substs)
|
||||
substs += vec::tailn(m_substs, vec::len(m_substs)
|
||||
- (method_n_tps as uint));
|
||||
}
|
||||
// And then instantiate the self type using all those.
|
||||
|
Loading…
Reference in New Issue
Block a user