make vec fns/methods take imm slices.
this also repairs the unsoundness in typing of unpack_slice, which was silently converting a const ptr to an imm one.
This commit is contained in:
parent
e94683dce9
commit
3f6e6532ac
12 changed files with 235 additions and 194 deletions
|
|
@ -1512,7 +1512,8 @@ fn lookup_in_globs(e: env, globs: [glob_imp_def], sp: span, id: ident,
|
|||
none { none }
|
||||
}
|
||||
}
|
||||
let matches = vec::filter_map(copy globs,
|
||||
let g = copy globs; // FIXME #2405
|
||||
let matches = vec::filter_map(g,
|
||||
{|x| lookup_in_mod_(e, x, sp, id, ns, dr)});
|
||||
if vec::len(matches) == 0u {
|
||||
ret none;
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ fn classify_ty(ty: TypeRef) -> [x86_64_reg_class] {
|
|||
}
|
||||
|
||||
fn all_mem(cls: [mut x86_64_reg_class]) {
|
||||
vec::iteri(cls) {|i, _c|
|
||||
for uint::range(0u, cls.len()) { |i|
|
||||
cls[i] = memory_class;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue