rustc: Change methods in ty::t to use interior vectors
This commit is contained in:
parent
172c5633c4
commit
6720ea760d
4 changed files with 48 additions and 43 deletions
|
|
@ -230,7 +230,7 @@ fn parse_ty(@pstate st, str_def sd) -> ty::t {
|
|||
}
|
||||
case ('O') {
|
||||
assert (next(st) as char == '[');
|
||||
let vec[ty::method] methods = [];
|
||||
let ty::method[] methods = ~[];
|
||||
while (peek(st) as char != ']') {
|
||||
auto proto;
|
||||
alt (next(st) as char) {
|
||||
|
|
@ -243,12 +243,12 @@ fn parse_ty(@pstate st, str_def sd) -> ty::t {
|
|||
}
|
||||
auto func = parse_ty_fn(st, sd);
|
||||
methods +=
|
||||
[rec(proto=proto,
|
||||
ident=name,
|
||||
inputs=func._0,
|
||||
output=func._1,
|
||||
cf=func._2,
|
||||
constrs=func._3)];
|
||||
~[rec(proto=proto,
|
||||
ident=name,
|
||||
inputs=func._0,
|
||||
output=func._1,
|
||||
cf=func._2,
|
||||
constrs=func._3)];
|
||||
}
|
||||
st.pos += 1u;
|
||||
ret ty::mk_obj(st.tcx, methods);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue