Port the compiler to the typaram foo<T> syntax.
This commit is contained in:
parent
f764f9a8cf
commit
e4a0f997fb
51 changed files with 568 additions and 568 deletions
|
|
@ -28,7 +28,7 @@ import print::pprust::print_type;
|
|||
import print::pprust::print_literal;
|
||||
import print::pp::mk_printer;
|
||||
|
||||
type flag = hashmap[str, ()];
|
||||
type flag = hashmap<str, ()>;
|
||||
|
||||
fn def_eq(a: &ast::def_id, b: &ast::def_id) -> bool {
|
||||
ret a.crate == b.crate && a.node == b.node;
|
||||
|
|
@ -41,9 +41,9 @@ fn hash_def(d: &ast::def_id) -> uint {
|
|||
ret h;
|
||||
}
|
||||
|
||||
fn new_def_hash[@V]() -> std::map::hashmap[ast::def_id, V] {
|
||||
let hasher: std::map::hashfn[ast::def_id] = hash_def;
|
||||
let eqer: std::map::eqfn[ast::def_id] = def_eq;
|
||||
fn new_def_hash[@V]() -> std::map::hashmap<ast::def_id, V> {
|
||||
let hasher: std::map::hashfn<ast::def_id> = hash_def;
|
||||
let eqer: std::map::eqfn<ast::def_id> = def_eq;
|
||||
ret std::map::mk_hashmap[ast::def_id, V](hasher, eqer);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ fn ty_to_str(cx: &ctxt, typ: &t) -> str {
|
|||
let s = mode_str(input.mode);
|
||||
ret s + ty_to_str(cx, input.ty);
|
||||
}
|
||||
fn fn_to_str(cx: &ctxt, proto: ast::proto, ident: option::t[ast::ident],
|
||||
fn fn_to_str(cx: &ctxt, proto: ast::proto, ident: option::t<ast::ident>,
|
||||
inputs: &[arg], output: t, cf: ast::controlflow,
|
||||
constrs: &[@constr]) -> str {
|
||||
let s = proto_to_str(proto);
|
||||
|
|
@ -92,7 +92,7 @@ fn ty_to_str(cx: &ctxt, typ: &t) -> str {
|
|||
ty_istr. { s += "istr"; }
|
||||
ty_box(tm) { s += "@" + mt_to_str(cx, tm); }
|
||||
ty_uniq(t) { s += "~" + ty_to_str(cx, t); }
|
||||
ty_vec(tm) { s += "vec[" + mt_to_str(cx, tm) + "]"; }
|
||||
ty_vec(tm) { s += "vec<" + mt_to_str(cx, tm) + ">"; }
|
||||
ty_ivec(tm) { s += "[" + mt_to_str(cx, tm) + "]"; }
|
||||
ty_type. { s += "type"; }
|
||||
ty_rec(elems) {
|
||||
|
|
@ -162,7 +162,7 @@ fn constrs_str(constrs: &[@constr]) -> str {
|
|||
ret s;
|
||||
}
|
||||
|
||||
fn ty_constr_to_str[Q](c: &@ast::spanned[ast::constr_general_[ast::path, Q]])
|
||||
fn ty_constr_to_str[Q](c: &@ast::spanned<ast::constr_general_<ast::path, Q>>)
|
||||
-> str {
|
||||
ret path_to_str(c.node.path) +
|
||||
constr_args_to_str[ast::path](path_to_str, c.node.args);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue