]> git.lizzy.rs Git - rust.git/commitdiff
Port the compiler to the expr foo::<T> syntax.
authorErick Tryzelaar <erick.tryzelaar@gmail.com>
Sat, 13 Aug 2011 07:09:25 +0000 (00:09 -0700)
committerGraydon Hoare <graydon@mozilla.com>
Tue, 16 Aug 2011 22:05:56 +0000 (15:05 -0700)
37 files changed:
src/comp/driver/rustc.rs
src/comp/front/attr.rs
src/comp/lib/llvm.rs
src/comp/metadata/creader.rs
src/comp/metadata/cstore.rs
src/comp/metadata/decoder.rs
src/comp/metadata/encoder.rs
src/comp/metadata/tydecode.rs
src/comp/middle/alias.rs
src/comp/middle/ast_map.rs
src/comp/middle/check_alt.rs
src/comp/middle/resolve.rs
src/comp/middle/trans.rs
src/comp/middle/trans_common.rs
src/comp/middle/trans_objects.rs
src/comp/middle/tstate/auxiliary.rs
src/comp/middle/tstate/bitvectors.rs
src/comp/middle/tstate/ck.rs
src/comp/middle/tstate/collect_locals.rs
src/comp/middle/tstate/pre_post_conditions.rs
src/comp/middle/ty.rs
src/comp/middle/typeck.rs
src/comp/syntax/ast.rs
src/comp/syntax/ext/base.rs
src/comp/syntax/ext/env.rs
src/comp/syntax/ext/fmt.rs
src/comp/syntax/ext/ident_to_str.rs
src/comp/syntax/ext/simplext.rs
src/comp/syntax/fold.rs
src/comp/syntax/parse/lexer.rs
src/comp/syntax/parse/parser.rs
src/comp/syntax/parse/token.rs
src/comp/syntax/print/pprust.rs
src/comp/syntax/util/interner.rs
src/comp/syntax/visit.rs
src/comp/util/common.rs
src/comp/util/ppaux.rs

index b2ae862dc74ed3662605a79d181e28188d81803a..28ad53f75559083c133bba4d532ee3013f4da10d 100644 (file)
@@ -150,9 +150,9 @@ fn compile_input(sess: session::session, cfg: ast::crate_cfg, input: str,
         time(time_passes, "freevar finding",
              bind freevars::annotate_freevars(sess, d, crate));
     let ty_cx = ty::mk_ctxt(sess, d, ast_map, freevars);
-    time[()](time_passes, "typechecking",
+    time::<()>(time_passes, "typechecking",
              bind typeck::check_crate(ty_cx, crate));
-    time[()](time_passes, "alt checking",
+    time::<()>(time_passes, "alt checking",
              bind middle::check_alt::check_crate(ty_cx, crate));
     if sess.get_opts().run_typestate {
         time(time_passes, "typestate checking",
@@ -160,15 +160,15 @@ fn compile_input(sess: session::session, cfg: ast::crate_cfg, input: str,
     }
     time(time_passes, "alias checking",
          bind middle::alias::check_crate(ty_cx, crate));
-    time[()](time_passes, "kind checking",
+    time::<()>(time_passes, "kind checking",
              bind kind::check_crate(ty_cx, crate));
     if sess.get_opts().no_trans { ret; }
     let llmod =
-        time[llvm::llvm::ModuleRef](time_passes, "translation",
+        time::<llvm::llvm::ModuleRef>(time_passes, "translation",
                                     bind trans::trans_crate(sess, crate,
                                                             ty_cx, output,
                                                             ast_map));
-    time[()](time_passes, "LLVM passes",
+    time::<()>(time_passes, "LLVM passes",
              bind link::write::run_passes(sess, llmod, output));
 }
 
@@ -459,14 +459,14 @@ fn main(args: vec<str>) {
     }
     let sopts = build_session_options(binary, match, binary_dir);
     let sess = build_session(sopts);
-    let n_inputs = vec::len[str](match.free);
+    let n_inputs = vec::len::<str>(match.free);
     let output_file = getopts::opt_maybe_str(match, "o");
     let glue = opt_present(match, "glue");
     if glue {
         if n_inputs > 0u {
             sess.fatal("No input files allowed with --glue.");
         }
-        let out = option::from_maybe[str]("glue.bc", output_file);
+        let out = option::from_maybe::<str>("glue.bc", output_file);
         middle::trans::make_common_glue(sess, out);
         ret;
     }
@@ -479,26 +479,28 @@ fn main(args: vec<str>) {
     let saved_out_filename: str = "";
     let cfg = build_configuration(sess, binary, ifile);
     let expand =
-        option::map[str,
-                    pp_mode](bind parse_pretty(sess, _),
-                             getopts::opt_default(match, "expand", "normal"));
+        option::map::<str,
+                      pp_mode>(bind parse_pretty(sess, _),
+                               getopts::opt_default(match, "expand",
+                                                    "normal"));
     alt expand {
-      some[pp_mode](ppm) {
+      some::<pp_mode>(ppm) {
         pretty_print_input(sess, cfg, ifile, ppm, true);
         ret;
       }
-      none[pp_mode]. {/* continue */ }
+      none::<pp_mode>. {/* continue */ }
     }
     let pretty =
-        option::map[str,
-                    pp_mode](bind parse_pretty(sess, _),
-                             getopts::opt_default(match, "pretty", "normal"));
+        option::map::<str,
+                      pp_mode>(bind parse_pretty(sess, _),
+                               getopts::opt_default(match, "pretty",
+                                                    "normal"));
     alt pretty {
-      some[pp_mode](ppm) {
+      some::<pp_mode>(ppm) {
         pretty_print_input(sess, cfg, ifile, ppm, false);
         ret;
       }
-      none[pp_mode]. {/* continue */ }
+      none::<pp_mode>. {/* continue */ }
     }
     let ls = opt_present(match, "ls");
     if ls {
index 6e6b00954002009280ff5f40d140cec061cf19bb..c06e1810497bddb64c14c6d49076df810214df8d 100644 (file)
@@ -178,7 +178,7 @@ fn remove_meta_items_by_name(items: &[@ast::meta_item], name: str) ->
 
 fn require_unique_names(sess: &session::session,
                         metas: &[@ast::meta_item]) {
-    let map = map::mk_hashmap[str, ()](str::hash, str::eq);
+    let map = map::mk_hashmap::<str, ()>(str::hash, str::eq);
     for meta: @ast::meta_item in metas {
         let name = get_meta_item_name(meta);
         if map.contains_key(name) {
index 12bcb5ad5fa4499861b90b8d6d84b16834e8eebf..4b8653088eef300a36f70c01ed0fceeb2b72223d 100644 (file)
@@ -1303,7 +1303,7 @@ fn Phi(Ty: TypeRef, vals: &[ValueRef], bbs: &[BasicBlockRef]) ->
        ValueRef {
         assert (!*terminated);
         let phi = llvm::LLVMBuildPhi(B, Ty, str::buf(""));
-        assert (vec::len[ValueRef](vals) == vec::len[BasicBlockRef](bbs));
+        assert (vec::len::<ValueRef>(vals) == vec::len::<BasicBlockRef>(bbs));
         llvm::LLVMAddIncoming(phi, vec::to_ptr(vals), vec::to_ptr(bbs),
                               vec::len(vals));
         ret phi;
@@ -1311,7 +1311,7 @@ fn Phi(Ty: TypeRef, vals: &[ValueRef], bbs: &[BasicBlockRef]) ->
 
     fn AddIncomingToPhi(phi: ValueRef, vals: &[ValueRef],
                         bbs: &[BasicBlockRef]) {
-        assert (vec::len[ValueRef](vals) == vec::len[BasicBlockRef](bbs));
+        assert (vec::len::<ValueRef>(vals) == vec::len::<BasicBlockRef>(bbs));
         llvm::LLVMAddIncoming(phi, vec::to_ptr(vals), vec::to_ptr(bbs),
                               vec::len(vals));
     }
@@ -1440,7 +1440,7 @@ fn associate(s: str, t: TypeRef) {
 }
 
 fn mk_type_names() -> type_names {
-    let nt = std::map::new_str_hash[TypeRef]();
+    let nt = std::map::new_str_hash::<TypeRef>();
 
     fn hash(t: &TypeRef) -> uint { ret t as uint; }
 
@@ -1448,7 +1448,7 @@ fn mk_type_names() -> type_names {
 
     let hasher: std::map::hashfn<TypeRef> = hash;
     let eqer: std::map::eqfn<TypeRef> = eq;
-    let tn = std::map::mk_hashmap[TypeRef, str](hasher, eqer);
+    let tn = std::map::mk_hashmap::<TypeRef, str>(hasher, eqer);
 
     ret type_names(tn, nt);
 }
@@ -1503,7 +1503,7 @@ fn tys_str(names: type_names, outer: &[TypeRef], tys: &[TypeRef]) -> str {
         let s = "fn(";
         let out_ty: TypeRef = llvm::LLVMGetReturnType(ty);
         let n_args: uint = llvm::LLVMCountParamTypes(ty);
-        let args: [TypeRef] = vec::init_elt[TypeRef](0 as TypeRef, n_args);
+        let args: [TypeRef] = vec::init_elt::<TypeRef>(0 as TypeRef, n_args);
         llvm::LLVMGetParamTypes(ty, vec::to_ptr(args));
         s += tys_str(names, outer, args);
         s += ") -> ";
@@ -1515,7 +1515,7 @@ fn tys_str(names: type_names, outer: &[TypeRef], tys: &[TypeRef]) -> str {
       9 {
         let s: str = "{";
         let n_elts: uint = llvm::LLVMCountStructElementTypes(ty);
-        let elts: [TypeRef] = vec::init_elt[TypeRef](0 as TypeRef, n_elts);
+        let elts: [TypeRef] = vec::init_elt::<TypeRef>(0 as TypeRef, n_elts);
         llvm::LLVMGetStructElementTypes(ty, vec::to_ptr(elts));
         s += tys_str(names, outer, elts);
         s += "}";
@@ -1534,7 +1534,7 @@ fn tys_str(names: type_names, outer: &[TypeRef], tys: &[TypeRef]) -> str {
         for tout: TypeRef in outer0 {
             i += 1u;
             if tout as int == ty as int {
-                let n: uint = vec::len[TypeRef](outer0) - i;
+                let n: uint = vec::len::<TypeRef>(outer0) - i;
                 ret "*\\" + std::int::str(n as int);
             }
         }
index 58e85e904405821409f42673d501c4ff7fe431b8..4adceacdfde427411ac8b56fd554e483a7edad2e 100644 (file)
@@ -32,7 +32,7 @@
 fn read_crates(sess: session::session, crate: &ast::crate) {
     let e =
         @{sess: sess,
-          crate_cache: @std::map::new_str_hash[int](),
+          crate_cache: @std::map::new_str_hash::<int>(),
           library_search_paths: sess.get_opts().library_search_paths,
           mutable next_crate_num: 1};
     let v =
@@ -186,7 +186,7 @@ fn find_library_crate_aux(nn: &{prefix: str, suffix: str}, crate_name: str,
 fn get_metadata_section(filename: str) -> option::t<@[u8]> {
     let b = str::buf(filename);
     let mb = llvm::LLVMRustCreateMemoryBufferWithContentsOfFile(b);
-    if mb as int == 0 { ret option::none[@[u8]]; }
+    if mb as int == 0 { ret option::none::<@[u8]>; }
     let of = mk_object_file(mb);
     let si = mk_section_iter(of.llof);
     while llvm::LLVMIsSectionIteratorAtEnd(of.llof, si.llsi) == False {
@@ -196,11 +196,11 @@ fn get_metadata_section(filename: str) -> option::t<@[u8]> {
             let cbuf = llvm::LLVMGetSectionContents(si.llsi);
             let csz = llvm::LLVMGetSectionSize(si.llsi);
             let cvbuf: *u8 = std::unsafe::reinterpret_cast(cbuf);
-            ret option::some[@[u8]](@vec::unsafe::from_buf(cvbuf, csz));
+            ret option::some::<@[u8]>(@vec::unsafe::from_buf(cvbuf, csz));
         }
         llvm::LLVMMoveToNextSection(si.llsi);
     }
-    ret option::none[@[u8]];
+    ret option::none::<@[u8]>;
 }
 
 fn load_library_crate(sess: &session::session, span: span, ident: &ast::ident,
@@ -249,7 +249,7 @@ fn resolve_crate_deps(e: env, cdata: &@[u8]) -> cstore::cnum_map {
     log "resolving deps of external crate";
     // The map from crate numbers in the crate we're resolving to local crate
     // numbers
-    let cnum_map = new_int_hash[ast::crate_num]();
+    let cnum_map = new_int_hash::<ast::crate_num>();
     for dep: decoder::crate_dep in decoder::get_crate_deps(cdata) {
         let extrn_cnum = dep.cnum;
         let cname = dep.ident;
index 70e7ab1169dffd323c7102255e84dbf888c831ce..155597f94fa8e38883f602462503ba04b34c2dbd 100644 (file)
@@ -52,8 +52,8 @@
 fn p(cstore: &cstore) -> cstore_private { alt cstore { private(p) { p } } }
 
 fn mk_cstore() -> cstore {
-    let meta_cache = map::new_int_hash[crate_metadata]();
-    let crate_map = map::new_int_hash[ast::crate_num]();
+    let meta_cache = map::new_int_hash::<crate_metadata>();
+    let crate_map = map::new_int_hash::<ast::crate_num>();
     ret private(@{metas: meta_cache,
                   use_crate_map: crate_map,
                   mutable used_crate_files: ~[],
index b4203bd08e22a1066b1cf930d5c46a1e18979d2a..03a65dfd44c670d70bd03d51e73b597e71a1b185 100644 (file)
@@ -48,7 +48,7 @@ fn lookup_hash(d: &ebml::doc, eq_fn: fn(&[u8]) -> bool , hash: uint) ->
     let belt = tag_index_buckets_bucket_elt;
     for each elt: ebml::doc in ebml::tagged_docs(bucket, belt) {
         let pos = ebml::be_uint_from_bytes(elt.data, elt.start, 4u);
-        if eq_fn(vec::slice[u8](*elt.data, elt.start + 4u, elt.end)) {
+        if eq_fn(vec::slice::<u8>(*elt.data, elt.start + 4u, elt.end)) {
             result += ~[ebml::doc_at(d.data, pos)];
         }
     }
@@ -63,8 +63,8 @@ fn eq_item(bytes: &[u8], item_id: int) -> bool {
     let eqer = bind eq_item(_, item_id);
     let found = lookup_hash(items, eqer, hash_node_id(item_id));
     if vec::len(found) == 0u {
-        ret option::none[ebml::doc];
-    } else { ret option::some[ebml::doc](found.(0)); }
+        ret option::none::<ebml::doc>;
+    } else { ret option::some::<ebml::doc>(found.(0)); }
 }
 
 fn find_item(item_id: int, items: &ebml::doc) -> ebml::doc {
@@ -269,7 +269,7 @@ fn family_has_type_params(fam_ch: u8) -> bool {
 fn read_path(d: &ebml::doc) -> {path: str, pos: uint} {
     let desc = ebml::doc_data(d);
     let pos = ebml::be_uint_from_bytes(@desc, 0u, 4u);
-    let pathbytes = vec::slice[u8](desc, 4u, vec::len[u8](desc));
+    let pathbytes = vec::slice::<u8>(desc, 4u, vec::len::<u8>(desc));
     let path = str::unsafe_from_bytes(pathbytes);
     ret {path: path, pos: pos};
 }
index ca5f5af98c6b100be0c51ef5f62475f0d043f720..32c21d116a9becaaaf1682fdb3d9021275a15f4c 100644 (file)
@@ -176,7 +176,7 @@ fn encode_inlineness(ebml_w: &ebml::writer, c: u8) {
 
 fn encode_type_param_kinds(ebml_w: &ebml::writer, tps: &[ty_param]) {
     ebml::start_tag(ebml_w, tag_items_data_item_ty_param_kinds);
-    ebml::write_vint(ebml_w.writer, vec::len[ty_param](tps));
+    ebml::write_vint(ebml_w.writer, vec::len::<ty_param>(tps));
     for tp: ty_param in tps {
         let c = alt tp.kind {
           kind_unique. { 'u' }
@@ -236,7 +236,7 @@ fn encode_tag_variant_info(ecx: &@encode_ctxt, ebml_w: &ebml::writer,
         encode_tag_id(ebml_w, local_def(id));
         encode_type(ecx, ebml_w,
                     node_id_to_monotype(ecx.ccx.tcx, variant.node.id));
-        if vec::len[variant_arg](variant.node.args) > 0u {
+        if vec::len::<variant_arg>(variant.node.args) > 0u {
             encode_symbol(ecx, ebml_w, variant.node.id);
         }
         encode_discriminant(ecx, ebml_w, variant.node.id);
index 4adbfb279c7ec25afff6b9246cdb21d220bdf2fb..05e01d8af636081967ef096dd23641b073305222 100644 (file)
@@ -71,7 +71,7 @@ fn parse_constrs(st: @pstate, sd: str_def) -> [@ty::constr] {
         do  {
             next(st);
             let one: @ty::constr =
-                parse_constr[uint](st, sd, parse_constr_arg);
+                parse_constr::<uint>(st, sd, parse_constr_arg);
             rslt += ~[one];
         } while peek(st) as char == ';'
       }
@@ -88,7 +88,7 @@ fn parse_ty_constrs(st: @pstate, sd: str_def) -> [@ty::type_constr] {
         do  {
             next(st);
             let one: @ty::type_constr =
-                parse_constr[path](st, sd, parse_ty_constr_arg);
+                parse_constr::<path>(st, sd, parse_ty_constr_arg);
             rslt += ~[one];
         } while peek(st) as char == ';'
       }
@@ -406,14 +406,14 @@ fn parse_ty_fn(st: @pstate, sd: str_def) ->
 // Rust metadata parsing
 fn parse_def_id(buf: &[u8]) -> ast::def_id {
     let colon_idx = 0u;
-    let len = vec::len[u8](buf);
+    let len = vec::len::<u8>(buf);
     while colon_idx < len && buf.(colon_idx) != ':' as u8 { colon_idx += 1u; }
     if colon_idx == len {
         log_err "didn't find ':' when parsing def id";
         fail;
     }
-    let crate_part = vec::slice[u8](buf, 0u, colon_idx);
-    let def_part = vec::slice[u8](buf, colon_idx + 1u, len);
+    let crate_part = vec::slice::<u8>(buf, 0u, colon_idx);
+    let def_part = vec::slice::<u8>(buf, colon_idx + 1u, len);
 
     let crate_part_vec = ~[];
     let def_part_vec = ~[];
index e3c316989558a63c66df6a900f9e8deab3495f6d..a9cd0a869b03a3ee75bb13e6248b44be226743a3 100644 (file)
@@ -46,7 +46,7 @@ fn check_crate(tcx: ty::ctxt, crate: &@ast::crate) {
               visit_item: bind visit_item(cx, _, _, _),
               visit_expr: bind visit_expr(cx, _, _, _),
               visit_decl: bind visit_decl(cx, _, _, _)
-              with *visit::default_visitor[scope]()};
+              with *visit::default_visitor::<scope>()};
     visit::visit_crate(*crate, @~[], visit::mk_vt(v));
     tcx.sess.abort_if_errors();
 }
index 5af6d04a649e4b22ab400bfd825253e0bd1f74f0..a348787c76107659657bac2a2ccc0708f9a4696d 100644 (file)
@@ -18,13 +18,13 @@ fn map_crate(c: &crate) -> map {
     // FIXME: This is using an adapter to convert the smallintmap
     // interface to the hashmap interface. It would be better to just
     // convert everything to use the smallintmap.
-    let map = new_smallintmap_int_adapter[ast_node]();
+    let map = new_smallintmap_int_adapter::<ast_node>();
 
     let v_map =
         @{visit_item: bind map_item(map, _, _, _),
           visit_native_item: bind map_native_item(map, _, _, _),
           visit_expr: bind map_expr(map, _, _, _)
-             with *visit::default_visitor[()]()};
+             with *visit::default_visitor::<()>()};
     visit::visit_crate(c, (), visit::mk_vt(v_map));
     ret map;
 }
@@ -110,7 +110,7 @@ fn rehash() { fail }
         }
     }
 
-    let map = smallintmap::mk[V]();
+    let map = smallintmap::mk::<V>();
     ret adapter(map, key_idx, idx_key);
 }
 
index 54017c6e282bdaedae43d19a1620df4a02d45d3f..29be298aad1f18fa453f1b20005d5780d6164daf 100644 (file)
@@ -5,7 +5,7 @@ fn check_crate(tcx: &ty::ctxt, crate: &@crate) {
     let v =
         @{visit_expr: bind check_expr(tcx, _, _, _),
           visit_local: bind check_local(tcx, _, _, _)
-          with *visit::default_visitor[()]()};
+          with *visit::default_visitor::<()>()};
     visit::visit_crate(*crate, (), visit::mk_vt(v));
     tcx.sess.abort_if_errors();
 }
index f919520a097cf898648a0e3efe1350f3124d96ee..b87f3bbda4b93c912798bf5f328e95b06c558965 100644 (file)
@@ -86,7 +86,7 @@ fn eq(v1: &key, v2: &key) -> bool {
         ret util::common::def_eq(v1.did, v2.did) &&
                 str::eq(v1.ident, v2.ident) && v1.ns == v2.ns;
     }
-    ret std::map::mk_hashmap[key, def](hash, eq);
+    ret std::map::mk_hashmap::<key, def>(hash, eq);
 }
 
 tag mod_index_entry {
@@ -135,11 +135,11 @@ fn resolve_crate(sess: session, amap: &ast_map::map, crate: @ast::crate) ->
    def_map {
     let e =
         @{cstore: sess.get_cstore(),
-          def_map: new_int_hash[def](),
+          def_map: new_int_hash::<def>(),
           ast_map: amap,
-          imports: new_int_hash[import_state](),
-          mod_map: new_int_hash[@indexed_mod](),
-          ext_map: new_def_hash[[ident]](),
+          imports: new_int_hash::<import_state>(),
+          mod_map: new_int_hash::<@indexed_mod>(),
+          ext_map: new_def_hash::<[ident]>(),
           ext_cache: new_ext_hash(),
           mutable reported: ~[],
           sess: sess};
@@ -159,7 +159,7 @@ fn map_crate(e: &@env, c: &@ast::crate) {
     let v_map_mod =
         @{visit_view_item: bind index_vi(e, _, _, _),
           visit_item: bind index_i(e, _, _, _)
-             with *visit::default_visitor[scopes]()};
+             with *visit::default_visitor::<scopes>()};
     visit::visit_crate(*c, cons(scope_crate, @nil), visit::mk_vt(v_map_mod));
     // Register the top-level mod
 
@@ -167,7 +167,7 @@ fn map_crate(e: &@env, c: &@ast::crate) {
                      @{m: some(c.node.module),
                        index: index_mod(c.node.module),
                        mutable glob_imports: ~[],
-                       glob_imported_names: new_str_hash[import_state]()});
+                       glob_imported_names: new_str_hash::<import_state>()});
     fn index_vi(e: @env, i: &@ast::view_item, sc: &scopes, v: &vt<scopes>) {
         alt i.node {
           ast::view_item_import(_, ids, id) {
@@ -180,7 +180,7 @@ fn index_i(e: @env, i: &@ast::item, sc: &scopes, v: &vt<scopes>) {
         visit_item_with_scope(i, sc, v);
         alt i.node {
           ast::item_mod(md) {
-            let s = new_str_hash[import_state]();
+            let s = new_str_hash::<import_state>();
             e.mod_map.insert(i.id,
                              @{m: some(md),
                                index: index_mod(md),
@@ -188,9 +188,9 @@ fn index_i(e: @env, i: &@ast::item, sc: &scopes, v: &vt<scopes>) {
                                glob_imported_names: s});
           }
           ast::item_native_mod(nmd) {
-            let s = new_str_hash[import_state]();
+            let s = new_str_hash::<import_state>();
             e.mod_map.insert(i.id,
-                             @{m: none[ast::_mod],
+                             @{m: none::<ast::_mod>,
                                index: index_nmod(nmd),
                                mutable glob_imports: ~[],
                                glob_imported_names: s});
@@ -203,7 +203,7 @@ fn index_i(e: @env, i: &@ast::item, sc: &scopes, v: &vt<scopes>) {
     let v_link_glob =
         @{visit_view_item: bind link_glob(e, _, _, _),
           visit_item: visit_item_with_scope
-             with *visit::default_visitor[scopes]()};
+             with *visit::default_visitor::<scopes>()};
     visit::visit_crate(*c, cons(scope_crate, @nil),
                        visit::mk_vt(v_link_glob));
     fn link_glob(e: @env, vi: &@ast::view_item, sc: &scopes, v: &vt<scopes>) {
@@ -387,7 +387,7 @@ fn visit_arm_with_scope(a: &ast::arm, sc: &scopes, v: &vt<scopes>) {
 fn visit_expr_with_scope(x: &@ast::expr, sc: &scopes, v: &vt<scopes>) {
     alt x.node {
       ast::expr_for(decl, coll, blk) | ast::expr_for_each(decl, coll, blk) {
-        let new_sc = cons[scope](scope_loop(decl), @sc);
+        let new_sc = cons::<scope>(scope_loop(decl), @sc);
         v.visit_expr(coll, sc, v);
         v.visit_local(decl, new_sc, v);
         v.visit_block(blk, new_sc, v);
@@ -684,7 +684,7 @@ fn in_scope(e: &env, sp: &span, name: &ident, s: &scope, ns: namespace) ->
             }
           }
         }
-        ret none[def];
+        ret none::<def>;
     }
     let left_fn = false;
     // Used to determine whether obj fields are in scope
@@ -692,7 +692,7 @@ fn in_scope(e: &env, sp: &span, name: &ident, s: &scope, ns: namespace) ->
     let left_fn_level2 = false;
     while true {
         alt { sc } {
-          nil. { ret none[def]; }
+          nil. { ret none::<def>; }
           cons(hd, tl) {
             let fnd = in_scope(e, sp, name, hd, ns);
             if !is_none(fnd) {
@@ -734,7 +734,7 @@ fn lookup_in_ty_params(name: &ident, ty_params: &[ast::ty_param]) ->
         if str::eq(tp.ident, name) { ret some(ast::def_ty_arg(i,tp.kind)); }
         i += 1u;
     }
-    ret none[def];
+    ret none::<def>;
 }
 
 fn lookup_in_pat(name: &ident, pat: &@ast::pat) -> option::t<def_id> {
@@ -758,10 +758,10 @@ fn lookup_in_fn(name: &ident, decl: &ast::fn_decl,
                 ret some(ast::def_arg(local_def(a.id)));
             }
         }
-        ret none[def];
+        ret none::<def>;
       }
       ns_type. { ret lookup_in_ty_params(name, ty_params); }
-      _ { ret none[def]; }
+      _ { ret none::<def>; }
     }
 }
 
@@ -774,10 +774,10 @@ fn lookup_in_obj(name: &ident, ob: &ast::_obj, ty_params: &[ast::ty_param],
                 ret some(ast::def_obj_field(local_def(f.id)));
             }
         }
-        ret none[def];
+        ret none::<def>;
       }
       ns_type. { ret lookup_in_ty_params(name, ty_params); }
-      _ { ret none[def]; }
+      _ { ret none::<def>; }
     }
 }
 
@@ -835,7 +835,7 @@ fn lookup_in_block(name: &ident, b: &ast::blk_, pos: uint, loc_pos: uint,
           _ { }
         }
     }
-    ret none[def];
+    ret none::<def>;
 }
 
 fn found_def_item(i: &@ast::item, ns: namespace) -> option::t<def> {
@@ -880,7 +880,7 @@ fn found_def_item(i: &@ast::item, ns: namespace) -> option::t<def> {
       }
       _ { }
     }
-    ret none[def];
+    ret none::<def>;
 }
 
 fn lookup_in_mod_strict(e: &env, sc: &scopes, m: def, sp: &span, name: &ident,
@@ -929,7 +929,7 @@ fn found_view_item(e: &env, vi: @ast::view_item, ns: namespace) ->
         ret lookup_import(e, local_def(id), ns);
       }
       ast::view_item_import_glob(_, defid) {
-        ret none[def]; //will be handled in the fallback glob pass
+        ret none::<def>; //will be handled in the fallback glob pass
 
       }
     }
@@ -959,7 +959,7 @@ fn lookup_in_local_mod(e: &env, node_id: node_id, sp: &span, id: &ident,
     if dr == outside && !ast::is_exported(id, option::get(info.m)) {
         // if we're in a native mod, then dr==inside, so info.m is some _mod
 
-        ret none[def]; // name is not visible
+        ret none::<def>; // name is not visible
 
     }
     alt info.index.find(id) {
@@ -1027,7 +1027,7 @@ fn lookup_in_mod_(e: &env, def: &glob_imp_def, sp: &span,
     alt info.glob_imported_names.get(id) {
       todo(_, _) { e.sess.bug("Shouldn't've put a todo in."); }
       resolving(sp) {
-        ret none[def]; //circularity is okay in import globs
+        ret none::<def>; //circularity is okay in import globs
 
       }
       resolved(val, typ, md) {
@@ -1052,7 +1052,7 @@ fn lookup_in_mie(e: &env, mie: &mod_index_entry, ns: namespace) ->
                 let vid = variants.(variant_idx).node.id;
                 ret some(ast::def_variant(local_def(item.id),
                                           local_def(vid)));
-            } else { ret none[def]; }
+            } else { ret none::<def>; }
           }
         }
       }
@@ -1072,7 +1072,7 @@ fn lookup_in_mie(e: &env, mie: &mod_index_entry, ns: namespace) ->
       }
       _ { }
     }
-    ret none[def];
+    ret none::<def>;
 }
 
 
@@ -1080,13 +1080,13 @@ fn lookup_in_mie(e: &env, mie: &mod_index_entry, ns: namespace) ->
 fn add_to_index(index: &hashmap<ident, list<mod_index_entry>>, id: &ident,
                 ent: &mod_index_entry) {
     alt index.find(id) {
-      none. { index.insert(id, cons(ent, @nil[mod_index_entry])); }
+      none. { index.insert(id, cons(ent, @nil::<mod_index_entry>)); }
       some(prev) { index.insert(id, cons(ent, @prev)); }
     }
 }
 
 fn index_mod(md: &ast::_mod) -> mod_index {
-    let index = new_str_hash[list<mod_index_entry>]();
+    let index = new_str_hash::<list<mod_index_entry>>();
     for it: @ast::view_item in md.view_items {
         alt it.node {
           ast::view_item_import(ident, _, _) | ast::view_item_use(ident, _, _)
@@ -1121,7 +1121,7 @@ fn index_mod(md: &ast::_mod) -> mod_index {
 }
 
 fn index_nmod(md: &ast::native_mod) -> mod_index {
-    let index = new_str_hash[list<mod_index_entry>]();
+    let index = new_str_hash::<list<mod_index_entry>>();
     for it: @ast::view_item in md.view_items {
         alt it.node {
           ast::view_item_use(ident, _, _) | ast::view_item_import(ident, _, _)
@@ -1163,7 +1163,7 @@ fn lookup_external(e: &env, cnum: int, ids: &[ident], ns: namespace) ->
         e.ext_map.insert(ast::def_id_of_def(d), ids);
         if ns == ns_for_def(d) { ret some(d); }
     }
-    ret none[def];
+    ret none::<def>;
 }
 
 
index 3beef789129066db1bffdba75438a9b3bc2b3f62..ed9a4120c62a58a57a2e4f54cd050d2fd51d56e8 100644 (file)
@@ -379,7 +379,7 @@ fn get_extern_const(externs: &hashmap<str, ValueRef>, llmod: ModuleRef,
 
 fn get_simple_extern_fn(externs: &hashmap<str, ValueRef>, llmod: ModuleRef,
                         name: &str, n_args: int) -> ValueRef {
-    let inputs = std::vec::init_elt[TypeRef](T_int(), n_args as uint);
+    let inputs = std::vec::init_elt::<TypeRef>(T_int(), n_args as uint);
     let output = T_int();
     let t = T_fn(inputs, output);
     ret get_extern_fn(externs, llmod, name, lib::llvm::LLVMCCallConv, t);
@@ -389,7 +389,7 @@ fn trans_native_call(b: &builder, glues: @glue_fns, lltaskptr: ValueRef,
                      externs: &hashmap<str, ValueRef>, tn: &type_names,
                      llmod: ModuleRef, name: &str, pass_task: bool,
                      args: &[ValueRef]) -> ValueRef {
-    let n: int = std::vec::len[ValueRef](args) as int;
+    let n: int = std::vec::len::<ValueRef>(args) as int;
     let llnative: ValueRef = get_simple_extern_fn(externs, llmod, name, n);
     let call_args: [ValueRef] = ~[];
     for a: ValueRef in args { call_args += ~[b.ZExtOrBitCast(a, T_int())]; }
@@ -712,7 +712,7 @@ fn GEP_tup_like(cx: &@block_ctxt, t: &ty::t, base: ValueRef, ixs: &[int]) ->
 
     fn split_type(ccx: &@crate_ctxt, t: &ty::t, ixs: &[int], n: uint) ->
        {prefix: [ty::t], target: ty::t} {
-        let len: uint = std::vec::len[int](ixs);
+        let len: uint = std::vec::len::<int>(ixs);
         // We don't support 0-index or 1-index GEPs: The former is nonsense
         // and the latter would only be meaningful if we supported non-0
         // values for the 0th index (we don't).
@@ -878,7 +878,7 @@ fn trans_malloc_boxed(cx: &@block_ctxt, t: ty::t) ->
 // tydesc if necessary.
 fn field_of_tydesc(cx: &@block_ctxt, t: &ty::t, escapes: bool, field: int) ->
    result {
-    let ti = none[@tydesc_info];
+    let ti = none::<@tydesc_info>;
     let tydesc = get_tydesc(cx, t, escapes, ti);
     ret rslt(tydesc.bcx,
              tydesc.bcx.build.GEP(tydesc.val, ~[C_int(0), C_int(field)]));
@@ -954,10 +954,10 @@ fn get_derived_tydesc(cx: &@block_ctxt, t: &ty::t, escapes: bool,
     let bcx = new_raw_block_ctxt(cx.fcx, cx.fcx.llderivedtydescs);
     let n_params: uint = ty::count_ty_params(bcx_tcx(bcx), t);
     let tys = linearize_ty_params(bcx, t);
-    assert (n_params == std::vec::len[uint](tys.params));
-    assert (n_params == std::vec::len[ValueRef](tys.descs));
+    assert (n_params == std::vec::len::<uint>(tys.params));
+    assert (n_params == std::vec::len::<ValueRef>(tys.descs));
     let root_ti = get_static_tydesc(bcx, t, tys.params);
-    static_ti = some[@tydesc_info](root_ti);
+    static_ti = some::<@tydesc_info>(root_ti);
     lazily_emit_all_tydesc_glue(cx, static_ti);
     let root = root_ti.tydesc;
     let sz = size_of(bcx, t);
@@ -1033,7 +1033,7 @@ fn get_tydesc(cx: &@block_ctxt, orig_t: &ty::t, escapes: bool,
 
     // Otherwise, generate a tydesc if necessary, and return it.
     let info = get_static_tydesc(cx, t, ~[]);
-    static_ti = some[@tydesc_info](info);
+    static_ti = some::<@tydesc_info>(info);
     ret rslt(cx, info.tydesc);
 }
 
@@ -1110,10 +1110,10 @@ fn declare_tydesc(cx: &@local_ctxt, sp: &span, t: &ty::t, ty_params: &[uint])
           tydesc: gvar,
           size: llsize,
           align: llalign,
-          mutable copy_glue: none[ValueRef],
-          mutable drop_glue: none[ValueRef],
-          mutable free_glue: none[ValueRef],
-          mutable cmp_glue: none[ValueRef],
+          mutable copy_glue: none::<ValueRef>,
+          mutable drop_glue: none::<ValueRef>,
+          mutable free_glue: none::<ValueRef>,
+          mutable cmp_glue: none::<ValueRef>,
           ty_params: ty_params};
     log "--- declare_tydesc " + ty_to_str(cx.ccx.tcx, t);
     ret info;
@@ -1150,7 +1150,7 @@ fn make_generic_glue_inner(cx: &@local_ctxt, sp: &span, t: &ty::t,
     if ty::type_has_dynamic_size(cx.ccx.tcx, t) {
         llty = T_ptr(T_i8());
     } else { llty = T_ptr(type_of(cx.ccx, sp, t)); }
-    let ty_param_count = std::vec::len[uint](ty_params);
+    let ty_param_count = std::vec::len::<uint>(ty_params);
     let lltyparams = llvm::LLVMGetParam(llfn, 3u);
     let copy_args_bcx = new_raw_block_ctxt(fcx, fcx.llcopyargs);
     let lltydescs = ~[mutable];
@@ -1341,7 +1341,7 @@ fn make_free_glue(cx: &@block_ctxt, v0: ValueRef, t: &ty::t) {
                 cx.build.GEP(body,
                              ~[C_int(0), C_int(abi::obj_body_elt_tydesc)]);
             let tydesc = cx.build.Load(tydescptr);
-            let ti = none[@tydesc_info];
+            let ti = none::<@tydesc_info>;
             call_tydesc_glue_full(cx, body, tydesc,
                                   abi::tydesc_field_drop_glue, ti);
             if (!bcx_ccx(cx).sess.get_opts().do_gc) {
@@ -1362,7 +1362,7 @@ fn make_free_glue(cx: &@block_ctxt, v0: ValueRef, t: &ty::t) {
             let tydescptr =
                 cx.build.GEP(body,
                              ~[C_int(0), C_int(abi::closure_elt_tydesc)]);
-            let ti = none[@tydesc_info];
+            let ti = none::<@tydesc_info>;
             call_tydesc_glue_full(cx, bindings, cx.build.Load(tydescptr),
                                   abi::tydesc_field_drop_glue, ti);
             if (!bcx_ccx(cx).sess.get_opts().do_gc) {
@@ -1571,7 +1571,7 @@ fn compare_scalar_types(cx: @block_ctxt, lhs: ValueRef, rhs: ValueRef,
         ret rslt(new_sub_block_ctxt(cx, "after_fail_dummy"), C_bool(false));
       }
       ty::ty_native(_) {
-        trans_fail(cx, none[span],
+        trans_fail(cx, none::<span>,
                    "attempt to compare values of type native");
         ret rslt(new_sub_block_ctxt(cx, "after_fail_dummy"), C_bool(false));
       }
@@ -1757,7 +1757,7 @@ fn adapter(bcx: &@block_ctxt, av: ValueRef, unit_ty: ty::t,
     fn iter_variant(cx: @block_ctxt, a_tup: ValueRef,
                     variant: &ty::variant_info, tps: &[ty::t],
                     tid: &ast::def_id, f: &val_and_ty_fn) -> result {
-        if std::vec::len[ty::t](variant.args) == 0u {
+        if std::vec::len::<ty::t>(variant.args) == 0u {
             ret rslt(cx, C_nil());
         }
         let fn_ty = variant.ctor_ty;
@@ -2012,7 +2012,7 @@ fn lazily_emit_tydesc_glue(cx: &@block_ctxt, field: int,
                 let glue_fn =
                     declare_generic_glue(lcx, ti.ty, T_glue_fn(*lcx.ccx),
                                          "copy");
-                ti.copy_glue = some[ValueRef](glue_fn);
+                ti.copy_glue = some::<ValueRef>(glue_fn);
                 make_generic_glue(lcx, cx.sp, ti.ty, glue_fn,
                                   make_copy_glue, ti.ty_params,
                                   "take");
@@ -2030,7 +2030,7 @@ fn lazily_emit_tydesc_glue(cx: &@block_ctxt, field: int,
                 let glue_fn =
                     declare_generic_glue(lcx, ti.ty, T_glue_fn(*lcx.ccx),
                                          "drop");
-                ti.drop_glue = some[ValueRef](glue_fn);
+                ti.drop_glue = some::<ValueRef>(glue_fn);
                 make_generic_glue(lcx, cx.sp, ti.ty, glue_fn,
                                   make_drop_glue, ti.ty_params,
                                   "drop");
@@ -2048,7 +2048,7 @@ fn lazily_emit_tydesc_glue(cx: &@block_ctxt, field: int,
                 let glue_fn =
                     declare_generic_glue(lcx, ti.ty, T_glue_fn(*lcx.ccx),
                                          "free");
-                ti.free_glue = some[ValueRef](glue_fn);
+                ti.free_glue = some::<ValueRef>(glue_fn);
                 make_generic_glue(lcx, cx.sp, ti.ty, glue_fn,
                                   make_free_glue, ti.ty_params,
                                   "free");
@@ -2114,7 +2114,7 @@ fn call_tydesc_glue_full(cx: &@block_ctxt, v: ValueRef, tydesc: ValueRef,
 
 fn call_tydesc_glue(cx: &@block_ctxt, v: ValueRef, t: &ty::t, field: int) ->
    result {
-    let ti: option::t<@tydesc_info> = none[@tydesc_info];
+    let ti: option::t<@tydesc_info> = none::<@tydesc_info>;
     let td = get_tydesc(cx, t, false, ti);
     call_tydesc_glue_full(td.bcx, spill_if_immediate(td.bcx, v, t), td.val,
                           field, ti);
@@ -2130,7 +2130,7 @@ fn call_cmp_glue(cx: &@block_ctxt, lhs: ValueRef, rhs: ValueRef, t: &ty::t,
     let llrhs = spill_if_immediate(cx, rhs, t);
     let llrawlhsptr = cx.build.BitCast(lllhs, T_ptr(T_i8()));
     let llrawrhsptr = cx.build.BitCast(llrhs, T_ptr(T_i8()));
-    let ti = none[@tydesc_info];
+    let ti = none::<@tydesc_info>;
     let r = get_tydesc(cx, t, false, ti);
     lazily_emit_tydesc_glue(cx, abi::tydesc_field_cmp_glue, ti);
     let lltydesc = r.val;
@@ -2545,10 +2545,10 @@ fn trans_vec_append(cx: &@block_ctxt, t: &ty::t, lhs: ValueRef, rhs: ValueRef)
       _ { }
     }
     let bcx = cx;
-    let ti = none[@tydesc_info];
+    let ti = none::<@tydesc_info>;
     let llvec_tydesc = get_tydesc(bcx, t, false, ti);
     bcx = llvec_tydesc.bcx;
-    ti = none[@tydesc_info];
+    ti = none::<@tydesc_info>;
     let llelt_tydesc = get_tydesc(bcx, elt_ty, false, ti);
     lazily_emit_tydesc_glue(cx, abi::tydesc_field_copy_glue, ti);
     lazily_emit_tydesc_glue(cx, abi::tydesc_field_drop_glue, ti);
@@ -3346,13 +3346,13 @@ fn join_results(parent_cx: &@block_ctxt, t: TypeRef, ins: &[result]) ->
             bbs += ~[r.bcx.llbb];
         }
     }
-    alt std::vec::len[result](live) {
+    alt std::vec::len::<result>(live) {
       0u {
         // No incoming edges are live, so we're in dead-code-land.
         // Arbitrarily pick the first dead edge, since the caller
         // is just going to propagate it outward.
 
-        assert (std::vec::len[result](ins) >= 1u);
+        assert (std::vec::len::<result>(ins) >= 1u);
         ret ins.(0);
       }
       _ {/* fall through */ }
@@ -3427,7 +3427,8 @@ fn inner(cx: &@block_ctxt, local: @ast::local, curr: ValueRef, t: ty::t,
              body: &ast::blk, outer_next_cx: @block_ctxt) -> result {
         let next_cx = new_sub_block_ctxt(cx, "next");
         let scope_cx =
-            new_loop_scope_block_ctxt(cx, option::some[@block_ctxt](next_cx),
+            new_loop_scope_block_ctxt(cx,
+                                      option::some::<@block_ctxt>(next_cx),
                                       outer_next_cx, "for loop scope");
         cx.build.Br(scope_cx.llbb);
         let local_res = alloc_local(scope_cx, local);
@@ -3728,7 +3729,7 @@ fn trans_for_each(cx: &@block_ctxt, local: &@ast::local, seq: &@ast::expr,
       ast::expr_call(f, args) {
         let pair =
             create_real_fn_pair(cx, iter_body_llty, lliterbody, llenv.ptr);
-        r = trans_call(cx, f, some[ValueRef](cx.build.Load(pair)), args,
+        r = trans_call(cx, f, some::<ValueRef>(cx.build.Load(pair)), args,
                        seq.id);
         ret rslt(r.bcx, C_nil());
       }
@@ -3740,7 +3741,7 @@ fn trans_while(cx: &@block_ctxt, cond: &@ast::expr, body: &ast::blk) ->
     let cond_cx = new_scope_block_ctxt(cx, "while cond");
     let next_cx = new_sub_block_ctxt(cx, "next");
     let body_cx =
-        new_loop_scope_block_ctxt(cx, option::none[@block_ctxt], next_cx,
+        new_loop_scope_block_ctxt(cx, option::none::<@block_ctxt>, next_cx,
                                   "while loop body");
     let body_res = trans_block(body_cx, body, return);
     let cond_res = trans_expr(cond_cx, cond);
@@ -3755,7 +3756,7 @@ fn trans_do_while(cx: &@block_ctxt, body: &ast::blk, cond: &@ast::expr) ->
    result {
     let next_cx = new_sub_block_ctxt(cx, "next");
     let body_cx =
-        new_loop_scope_block_ctxt(cx, option::none[@block_ctxt], next_cx,
+        new_loop_scope_block_ctxt(cx, option::none::<@block_ctxt>, next_cx,
                                   "do-while loop body");
     let body_res = trans_block(body_cx, body, return);
     if is_terminated(body_res.bcx) {
@@ -3791,17 +3792,17 @@ fn trans_do_while(cx: &@block_ctxt, body: &ast::blk, cond: &@ast::expr) ->
 fn lval_mem(cx: &@block_ctxt, val: ValueRef) -> lval_result {
     ret {res: rslt(cx, val),
          is_mem: true,
-         generic: none[generic_info],
-         llobj: none[ValueRef],
-         method_ty: none[ty::t]};
+         generic: none::<generic_info>,
+         llobj: none::<ValueRef>,
+         method_ty: none::<ty::t>};
 }
 
 fn lval_val(cx: &@block_ctxt, val: ValueRef) -> lval_result {
     ret {res: rslt(cx, val),
          is_mem: false,
-         generic: none[generic_info],
-         llobj: none[ValueRef],
-         method_ty: none[ty::t]};
+         generic: none::<generic_info>,
+         llobj: none::<ValueRef>,
+         method_ty: none::<ty::t>};
 }
 
 fn trans_external_path(cx: &@block_ctxt, did: &ast::def_id,
@@ -3824,14 +3825,14 @@ fn lval_generic_fn(cx: &@block_ctxt, tpt: &ty::ty_param_kinds_and_ty,
         lv = lval_val(cx, trans_external_path(cx, fn_id, tpt));
     }
     let tys = ty::node_id_to_type_params(bcx_tcx(cx), id);
-    if std::vec::len[ty::t](tys) != 0u {
+    if std::vec::len::<ty::t>(tys) != 0u {
         let bcx = lv.res.bcx;
         let tydescs: [ValueRef] = ~[];
         let tis: [option::t<@tydesc_info>] = ~[];
         for t: ty::t in tys {
             // TODO: Doesn't always escape.
 
-            let ti = none[@tydesc_info];
+            let ti = none::<@tydesc_info>;
             let td = get_tydesc(bcx, t, true, ti);
             tis += ~[ti];
             bcx = td.bcx;
@@ -3972,7 +3973,7 @@ fn trans_field(cx: &@block_ctxt, sp: &span, v: ValueRef, t0: &ty::t,
                             ty::ty_fn_ret(tcx, fn_ty), 0u);
         v = r.bcx.build.PointerCast(v, T_ptr(T_ptr(ll_fn_ty)));
         let lvo = lval_mem(r.bcx, v);
-        ret {llobj: some[ValueRef](r.val), method_ty: some[ty::t](fn_ty)
+        ret {llobj: some::<ValueRef>(r.val), method_ty: some::<ty::t>(fn_ty)
                 with lvo};
       }
       _ { bcx_ccx(cx).sess.unimpl("field variant in trans_field"); }
@@ -4027,7 +4028,7 @@ fn trans_index(cx: &@block_ctxt, sp: &span, base: &@ast::expr,
     bcx.build.CondBr(bounds_check, next_cx.llbb, fail_cx.llbb);
     // fail: bad bounds check.
 
-    trans_fail(fail_cx, some[span](sp), "bounds check");
+    trans_fail(fail_cx, some::<span>(sp), "bounds check");
     let body;
     alt interior_len_and_data {
       some(lad) { body = lad.data; }
@@ -4126,7 +4127,7 @@ fn trans_lval(cx: &@block_ctxt, e: &@ast::expr) -> lval_result {
       some(gi) {
         let t = ty::expr_ty(bcx_tcx(cx), e);
         let n_args = std::vec::len(ty::ty_fn_args(bcx_tcx(cx), t));
-        let args = std::vec::init_elt(none[@ast::expr], n_args);
+        let args = std::vec::init_elt(none::<@ast::expr>, n_args);
         let bound = trans_bind_1(lv.res.bcx, e, lv, args, e.id);
         ret lval_val(bound.bcx, bound.val);
       }
@@ -4768,7 +4769,7 @@ fn trans_vec(cx: &@block_ctxt, args: &[@ast::expr], id: ast::node_id) ->
     let unit_sz = size_of(bcx, unit_ty);
     bcx = unit_sz.bcx;
     let data_sz =
-        bcx.build.Mul(C_uint(std::vec::len[@ast::expr](args)), unit_sz.val);
+        bcx.build.Mul(C_uint(std::vec::len::<@ast::expr>(args)), unit_sz.val);
     // FIXME: pass tydesc properly.
 
     let vec_val =
@@ -4781,7 +4782,7 @@ fn trans_vec(cx: &@block_ctxt, args: &[@ast::expr], id: ast::node_id) ->
     let body = bcx.build.GEP(vec_val, ~[C_int(0), C_int(abi::vec_elt_data)]);
     let pseudo_tup_ty =
         ty::mk_tup(bcx_tcx(cx),
-                       std::vec::init_elt[ty::t](unit_ty,
+                       std::vec::init_elt::<ty::t>(unit_ty,
                                                   std::vec::len(args)));
     let i: int = 0;
     for e: @ast::expr in args {
@@ -5100,7 +5101,7 @@ fn trans_expr_out(cx: &@block_ctxt, e: &@ast::expr, output: out_method) ->
       }
       ast::expr_bind(f, args) { ret trans_bind(cx, f, args, e.id); }
       ast::expr_call(f, args) {
-        ret trans_call(cx, f, none[ValueRef], args, e.id);
+        ret trans_call(cx, f, none::<ValueRef>, args, e.id);
       }
       ast::expr_cast(val, _) { ret trans_cast(cx, val, e.id); }
       ast::expr_vec(args, _, ast::sk_rc.) { ret trans_vec(cx, args, e.id); }
@@ -5237,7 +5238,7 @@ fn trans_log(lvl: int, cx: &@block_ctxt, e: &@ast::expr) -> result {
     let e_ty = ty::expr_ty(bcx_tcx(cx), e);
     let log_bcx = sub.bcx;
 
-    let ti = none[@tydesc_info];
+    let ti = none::<@tydesc_info>;
     let r = get_tydesc(log_bcx, e_ty, false, ti);
     log_bcx = r.bcx;
 
@@ -5257,7 +5258,7 @@ fn trans_check_expr(cx: &@block_ctxt, e: &@ast::expr, s: &str) -> result {
     let cond_res = trans_expr(cx, e);
     let expr_str = s + " " + expr_to_str(e) + " failed";
     let fail_cx = new_sub_block_ctxt(cx, "fail");
-    trans_fail(fail_cx, some[span](e.span), expr_str);
+    trans_fail(fail_cx, some::<span>(e.span), expr_str);
     let next_cx = new_sub_block_ctxt(cx, "next");
     cond_res.bcx.build.CondBr(cond_res.val, next_cx.llbb, fail_cx.llbb);
     ret rslt(next_cx, C_nil());
@@ -5587,9 +5588,9 @@ fn trans_block_cleanups(cx: &@block_ctxt, cleanup_cx: &@block_ctxt) ->
    @block_ctxt {
     let bcx = cx;
     if cleanup_cx.kind == NON_SCOPE_BLOCK {
-        assert (std::vec::len[cleanup](cleanup_cx.cleanups) == 0u);
+        assert (std::vec::len::<cleanup>(cleanup_cx.cleanups) == 0u);
     }
-    let i = std::vec::len[cleanup](cleanup_cx.cleanups);
+    let i = std::vec::len::<cleanup>(cleanup_cx.cleanups);
     while i > 0u {
         i -= 1u;
         let c = cleanup_cx.cleanups.(i);
@@ -5788,13 +5789,15 @@ fn new_fn_ctxt_w_id(cx: @local_ctxt, sp: &span, llfndecl: ValueRef,
     let llretptr: ValueRef = llvm::LLVMGetParam(llfndecl, 0u);
     let lltaskptr: ValueRef = llvm::LLVMGetParam(llfndecl, 1u);
     let llenv: ValueRef = llvm::LLVMGetParam(llfndecl, 2u);
-    let llargs: hashmap<ast::node_id, ValueRef> = new_int_hash[ValueRef]();
+    let llargs: hashmap<ast::node_id, ValueRef> = new_int_hash::<ValueRef>();
     let llobjfields: hashmap<ast::node_id, ValueRef> =
-        new_int_hash[ValueRef]();
-    let lllocals: hashmap<ast::node_id, ValueRef> = new_int_hash[ValueRef]();
-    let llupvars: hashmap<ast::node_id, ValueRef> = new_int_hash[ValueRef]();
+        new_int_hash::<ValueRef>();
+    let lllocals: hashmap<ast::node_id, ValueRef> =
+        new_int_hash::<ValueRef>();
+    let llupvars: hashmap<ast::node_id, ValueRef> =
+        new_int_hash::<ValueRef>();
     let derived_tydescs =
-        map::mk_hashmap[ty::t, derived_tydesc_info](ty::hash_ty, ty::eq_ty);
+        map::mk_hashmap::<ty::t, derived_tydesc_info>(ty::hash_ty, ty::eq_ty);
     let llbbs = mk_standard_basic_blocks(llfndecl);
     ret @{llfn: llfndecl,
           lltaskptr: lltaskptr,
@@ -5805,9 +5808,9 @@ fn new_fn_ctxt_w_id(cx: @local_ctxt, sp: &span, llfndecl: ValueRef,
           mutable llderivedtydescs_first: llbbs.dt,
           mutable llderivedtydescs: llbbs.dt,
           mutable lldynamicallocas: llbbs.da,
-          mutable llself: none[val_self_pair],
-          mutable lliterbody: none[ValueRef],
-          mutable iterbodyty: none[ty::t],
+          mutable llself: none::<val_self_pair>,
+          mutable lliterbody: none::<ValueRef>,
+          mutable iterbodyty: none::<ty::t>,
           llargs: llargs,
           llobjfields: llobjfields,
           lllocals: lllocals,
@@ -5845,7 +5848,7 @@ fn create_llargs_for_fn_args(cx: &@fn_ctxt, proto: ast::proto,
     // way.
     let arg_n = 3u;
     alt ty_self {
-      some(tt) { cx.llself = some[val_self_pair]({v: cx.llenv, t: tt}); }
+      some(tt) { cx.llself = some::<val_self_pair>({v: cx.llenv, t: tt}); }
       none. {
         let i = 0u;
         for tp: ast::ty_param in ty_params {
@@ -5865,7 +5868,7 @@ fn create_llargs_for_fn_args(cx: &@fn_ctxt, proto: ast::proto,
         cx.iterbodyty = some(ty::mk_iter_body_fn(fcx_tcx(cx), ret_ty));
         let llarg = llvm::LLVMGetParam(cx.llfn, arg_n);
         assert (llarg as int != 0);
-        cx.lliterbody = some[ValueRef](llarg);
+        cx.lliterbody = some::<ValueRef>(llarg);
         arg_n += 1u;
     }
 
@@ -5942,7 +5945,7 @@ fn populate_fn_ctxt_from_llself(fcx: @fn_ctxt, llself: val_self_pair) {
     // its magic.
 
     let fields_tup_ty = ty::mk_tup(fcx.lcx.ccx.tcx, field_tys);
-    let n_typarams = std::vec::len[ast::ty_param](bcx.fcx.lcx.obj_typarams);
+    let n_typarams = std::vec::len::<ast::ty_param>(bcx.fcx.lcx.obj_typarams);
     let llobj_box_ty: TypeRef = T_obj_ptr(*bcx_ccx(bcx), n_typarams);
     let box_cell =
         bcx.build.GEP(llself.v, ~[C_int(0), C_int(abi::obj_field_box)]);
@@ -6100,7 +6103,7 @@ fn trans_res_ctor(cx: @local_ctxt, sp: &span, dtor: &ast::_fn,
     }
     let fcx = new_fn_ctxt(cx, sp, llctor_decl);
     let ret_t = ty::ret_ty_of_fn(cx.ccx.tcx, ctor_id);
-    create_llargs_for_fn_args(fcx, ast::proto_fn, none[ty::t], ret_t,
+    create_llargs_for_fn_args(fcx, ast::proto_fn, none::<ty::t>, ret_t,
                               dtor.decl.inputs, ty_params);
     let bcx = new_top_block_ctxt(fcx);
     let lltop = bcx.llbb;
@@ -6132,7 +6135,7 @@ fn trans_res_ctor(cx: @local_ctxt, sp: &span, dtor: &ast::_fn,
 fn trans_tag_variant(cx: @local_ctxt, tag_id: ast::node_id,
                      variant: &ast::variant, index: int, is_degen: bool,
                      ty_params: &[ast::ty_param]) {
-    if std::vec::len[ast::variant_arg](variant.node.args) == 0u {
+    if std::vec::len::<ast::variant_arg>(variant.node.args) == 0u {
         ret; // nullary constructors are just constants
 
     }
@@ -6157,7 +6160,7 @@ fn trans_tag_variant(cx: @local_ctxt, tag_id: ast::node_id,
       }
     }
     let fcx = new_fn_ctxt(cx, variant.span, llfndecl);
-    create_llargs_for_fn_args(fcx, ast::proto_fn, none[ty::t],
+    create_llargs_for_fn_args(fcx, ast::proto_fn, none::<ty::t>,
                               ty::ret_ty_of_fn(cx.ccx.tcx, variant.node.id),
                               fn_args, ty_params);
     let ty_param_substs: [ty::t] = ~[];
@@ -6328,7 +6331,7 @@ fn decl_fn_and_pair_full(ccx: &@crate_ctxt, sp: &span, path: &[str],
       ty::ty_fn(proto, inputs, output, _, _) {
         llfty =
             type_of_fn(ccx, sp, proto, inputs, output,
-                       std::vec::len[ast::ty_param](ty_params));
+                       std::vec::len::<ast::ty_param>(ty_params));
       }
       _ { ccx.sess.bug("decl_fn_and_pair(): fn item doesn't have fn type!"); }
     }
@@ -6349,7 +6352,7 @@ fn decl_fn_and_pair_full(ccx: &@crate_ctxt, sp: &span, path: &[str],
 fn create_main_wrapper(ccx: &@crate_ctxt, sp: &span,
                        main_llfn: ValueRef, main_node_type: ty::t) {
 
-    if ccx.main_fn != none[ValueRef] {
+    if ccx.main_fn != none::<ValueRef> {
         ccx.sess.span_fatal(sp, "multiple 'main' functions");
     }
 
@@ -6537,7 +6540,7 @@ fn native_fn_ty_param_count(cx: &@crate_ctxt, id: ast::node_id) -> uint {
                         actually a fn");
       }
       ast::native_item_fn(_, _, tps) {
-        count = std::vec::len[ast::ty_param](tps);
+        count = std::vec::len::<ast::ty_param>(tps);
       }
     }
     ret count;
@@ -6850,7 +6853,7 @@ fn trans_constant(ccx: @crate_ctxt, it: &@ast::item, pt: &[str],
     alt it.node {
       ast::item_tag(variants, _) {
         let i = 0u;
-        let n_variants = std::vec::len[ast::variant](variants);
+        let n_variants = std::vec::len::<ast::variant>(variants);
         while i < n_variants {
             let variant = variants.(i);
             let p = new_pt + ~[it.ident, variant.node.name, "discrim"];
@@ -6917,7 +6920,7 @@ fn declare_intrinsics(llmod: ModuleRef) -> hashmap<str, ValueRef> {
         decl_cdecl_fn(llmod, "llvm.memset.p0i8.i64",
                       T_fn(T_memset64_args, T_void()));
     let trap = decl_cdecl_fn(llmod, "llvm.trap", T_fn(T_trap_args, T_void()));
-    let intrinsics = new_str_hash[ValueRef]();
+    let intrinsics = new_str_hash::<ValueRef>();
     intrinsics.insert("llvm.gcread", gcread);
     intrinsics.insert("llvm.memmove.p0i8.p0i8.i32", memmove32);
     intrinsics.insert("llvm.memmove.p0i8.p0i8.i64", memmove64);
@@ -7019,7 +7022,7 @@ fn create_crate_map(ccx: &@crate_ctxt) -> ValueRef {
         mapname = ccx.link_meta.name;
     } else { mapname = "toplevel"; }
     let sym_name = "_rust_crate_map_" + mapname;
-    let arrtype = T_array(T_int(), std::vec::len[ValueRef](subcrates));
+    let arrtype = T_array(T_int(), std::vec::len::<ValueRef>(subcrates));
     let maptype = T_struct(~[T_int(), arrtype]);
     let map = llvm::LLVMAddGlobal(ccx.llmod, maptype, str::buf(sym_name));
     llvm::LLVMSetLinkage(map,
@@ -7073,32 +7076,32 @@ fn trans_crate(sess: &session::session, crate: &@ast::crate, tcx: &ty::ctxt,
     let glues = make_glues(llmod, taskptr_type);
     let hasher = ty::hash_ty;
     let eqer = ty::eq_ty;
-    let tag_sizes = map::mk_hashmap[ty::t, uint](hasher, eqer);
-    let tydescs = map::mk_hashmap[ty::t, @tydesc_info](hasher, eqer);
-    let lltypes = map::mk_hashmap[ty::t, TypeRef](hasher, eqer);
-    let sha1s = map::mk_hashmap[ty::t, str](hasher, eqer);
-    let short_names = map::mk_hashmap[ty::t, str](hasher, eqer);
+    let tag_sizes = map::mk_hashmap::<ty::t, uint>(hasher, eqer);
+    let tydescs = map::mk_hashmap::<ty::t, @tydesc_info>(hasher, eqer);
+    let lltypes = map::mk_hashmap::<ty::t, TypeRef>(hasher, eqer);
+    let sha1s = map::mk_hashmap::<ty::t, str>(hasher, eqer);
+    let short_names = map::mk_hashmap::<ty::t, str>(hasher, eqer);
     let sha = std::sha1::mk_sha1();
     let ccx =
         @{sess: sess,
           llmod: llmod,
           td: td,
           tn: tn,
-          externs: new_str_hash[ValueRef](),
+          externs: new_str_hash::<ValueRef>(),
           intrinsics: intrinsics,
-          item_ids: new_int_hash[ValueRef](),
+          item_ids: new_int_hash::<ValueRef>(),
           ast_map: amap,
-          item_symbols: new_int_hash[str](),
-          mutable main_fn: none[ValueRef],
+          item_symbols: new_int_hash::<str>(),
+          mutable main_fn: none::<ValueRef>,
           link_meta: link::build_link_meta(sess, *crate, output, sha),
           tag_sizes: tag_sizes,
-          discrims: new_int_hash[ValueRef](),
-          discrim_symbols: new_int_hash[str](),
-          fn_pairs: new_int_hash[ValueRef](),
-          consts: new_int_hash[ValueRef](),
-          obj_methods: new_int_hash[()](),
+          discrims: new_int_hash::<ValueRef>(),
+          discrim_symbols: new_int_hash::<str>(),
+          fn_pairs: new_int_hash::<ValueRef>(),
+          consts: new_int_hash::<ValueRef>(),
+          obj_methods: new_int_hash::<()>(),
           tydescs: tydescs,
-          module_data: new_str_hash[ValueRef](),
+          module_data: new_str_hash::<ValueRef>(),
           lltypes: lltypes,
           glues: glues,
           names: namegen(0),
index fbec26fc64650787397b0cbeac51bbc5fbb911ac..1c7be7a3583550201ab10b2ab88599dc1e8ae18e 100644 (file)
 
     // For convenience, a vector of the incoming tydescs for each of
     // this functions type parameters, fetched via llvm::LLVMGetParam.
-    // For example, for a function foo[A, B, C](), lltydescs contains
+    // For example, for a function foo::<A, B, C>(), lltydescs contains
     // the ValueRefs for the tydescs for A, B, and C.
     mutable lltydescs: [ValueRef],
 
@@ -510,7 +510,7 @@ fn T_size_t() -> TypeRef {
 
 fn T_fn(inputs: &[TypeRef], output: TypeRef) -> TypeRef {
     ret llvm::LLVMFunctionType(output, std::vec::to_ptr(inputs),
-                               std::vec::len[TypeRef](inputs), False);
+                               std::vec::len::<TypeRef>(inputs), False);
 }
 
 fn T_fn_pair(cx: &crate_ctxt, tfn: TypeRef) -> TypeRef {
@@ -570,9 +570,9 @@ fn T_tydesc_field(cx: &crate_ctxt, field: int) -> TypeRef {
     // Bit of a kludge: pick the fn typeref out of the tydesc..
 
     let tydesc_elts: [TypeRef] =
-        std::vec::init_elt[TypeRef](T_nil(), abi::n_tydesc_fields as uint);
+        std::vec::init_elt::<TypeRef>(T_nil(), abi::n_tydesc_fields as uint);
     llvm::LLVMGetStructElementTypes(cx.tydesc_type,
-                                    std::vec::to_ptr[TypeRef](tydesc_elts));
+                                    std::vec::to_ptr::<TypeRef>(tydesc_elts));
     let t = llvm::LLVMGetElementType(tydesc_elts.(field));
     ret t;
 }
@@ -742,7 +742,7 @@ fn T_opaque_tag_ptr(tn: &type_names) -> TypeRef {
 }
 
 fn T_captured_tydescs(cx: &crate_ctxt, n: uint) -> TypeRef {
-    ret T_struct(std::vec::init_elt[TypeRef](T_ptr(cx.tydesc_type), n));
+    ret T_struct(std::vec::init_elt::<TypeRef>(T_ptr(cx.tydesc_type), n));
 }
 
 fn T_obj_ptr(cx: &crate_ctxt, n_captured_tydescs: uint) -> TypeRef {
index d8f08f7fc2bd5299cd17eb6faf78049446957526..4b2e8f20738faffbeda5d55aeb2d49314e3f0d2d 100644 (file)
@@ -51,7 +51,7 @@ fn trans_obj(cx: @local_ctxt, sp: &span, ob: &ast::_obj,
     let fcx = new_fn_ctxt(cx, sp, llctor_decl);
 
     // Both regular arguments and type parameters are handled here.
-    create_llargs_for_fn_args(fcx, ast::proto_fn, none[ty::t],
+    create_llargs_for_fn_args(fcx, ast::proto_fn, none::<ty::t>,
                               ty::ret_ty_of_fn(ccx.tcx, ctor_id), fn_args,
                               ty_params);
     let arg_tys: [ty::arg] = arg_tys_of_fn(ccx, ctor_id);
@@ -95,8 +95,8 @@ fn trans_obj(cx: @local_ctxt, sp: &span, ob: &ast::_obj,
     // typarams, and fields.
     let llbox_ty: TypeRef = T_ptr(T_empty_struct());
 
-    if std::vec::len[ast::ty_param](ty_params) == 0u &&
-           std::vec::len[ty::arg](arg_tys) == 0u {
+    if std::vec::len::<ast::ty_param>(ty_params) == 0u &&
+           std::vec::len::<ty::arg>(arg_tys) == 0u {
         // If the object we're translating has no fields or type parameters,
         // there's not much to do.
 
@@ -132,7 +132,7 @@ fn trans_obj(cx: @local_ctxt, sp: &span, ob: &ast::_obj,
             GEP_tup_like(bcx, body_ty, body,
                          ~[0, abi::obj_body_elt_tydesc]);
         bcx = body_tydesc.bcx;
-        let ti = none[@tydesc_info];
+        let ti = none::<@tydesc_info>;
         let body_td = get_tydesc(bcx, body_ty, true, ti);
         lazily_emit_tydesc_glue(bcx, abi::tydesc_field_drop_glue, ti);
         lazily_emit_tydesc_glue(bcx, abi::tydesc_field_free_glue, ti);
@@ -295,7 +295,7 @@ fn trans_anon_obj(bcx: @block_ctxt, sp: &span, anon_obj: &ast::anon_obj,
     // typarams, fields, and a pointer to our inner_obj.
     let llbox_ty: TypeRef = T_ptr(T_empty_struct());
 
-    if std::vec::len[ast::anon_obj_field](additional_fields) == 0u &&
+    if std::vec::len::<ast::anon_obj_field>(additional_fields) == 0u &&
            anon_obj.inner_obj == none {
 
         // If the object we're translating has no fields and no inner_obj,
@@ -326,7 +326,7 @@ fn trans_anon_obj(bcx: @block_ctxt, sp: &span, anon_obj: &ast::anon_obj,
             GEP_tup_like(bcx, body_ty, body,
                          ~[0, abi::obj_body_elt_tydesc]);
         bcx = body_tydesc.bcx;
-        let ti = none[@tydesc_info];
+        let ti = none::<@tydesc_info>;
         let body_td = get_tydesc(bcx, body_ty, true, ti);
         lazily_emit_tydesc_glue(bcx, abi::tydesc_field_drop_glue, ti);
         lazily_emit_tydesc_glue(bcx, abi::tydesc_field_free_glue, ti);
@@ -460,7 +460,7 @@ fn create_vtbl(cx: @local_ctxt, sp: &span, outer_obj_ty: ty::t,
 
         // Sort and process all the methods.
         let meths =
-            std::sort::merge_sort[@ast::method]
+            std::sort::merge_sort::<@ast::method>
             (bind ast_mthd_lteq(_, _), ob.methods);
 
         for m: @ast::method in meths {
@@ -496,7 +496,7 @@ fn create_vtbl(cx: @local_ctxt, sp: &span, outer_obj_ty: ty::t,
         // Filter out any methods that we don't need forwarding slots for
         // because they're being overridden.
         let f = bind filtering_fn(cx, _, ob.methods);
-        meths = std::vec::filter_map[vtbl_mthd, vtbl_mthd](f, meths);
+        meths = std::vec::filter_map::<vtbl_mthd, vtbl_mthd>(f, meths);
 
         // And now add the additional ones, both overriding ones and entirely
         // new ones.  These will just be normal methods.
@@ -504,7 +504,7 @@ fn create_vtbl(cx: @local_ctxt, sp: &span, outer_obj_ty: ty::t,
 
         // Sort all the methods and process them.
         meths =
-            std::sort::merge_sort[vtbl_mthd]
+            std::sort::merge_sort::<vtbl_mthd>
             (bind vtbl_mthd_lteq(_, _), meths);
 
         // To create forwarding methods, we'll need a "backwarding" vtbl.  See
@@ -615,7 +615,7 @@ fn process_bkwding_mthd(cx: @local_ctxt, sp: &span, m: @ty::method,
     // Get the backwarding function's type and declare it.
     let llbackwarding_fn_ty: TypeRef =
         type_of_fn_full(cx.ccx, sp, m.proto, true, m.inputs, m.output,
-                        std::vec::len[ast::ty_param](ty_params));
+                        std::vec::len::<ast::ty_param>(ty_params));
     let llbackwarding_fn: ValueRef =
         decl_internal_fastcall_fn(cx.ccx.llmod, s, llbackwarding_fn_ty);
 
@@ -684,7 +684,7 @@ fn process_bkwding_mthd(cx: @local_ctxt, sp: &span, m: @ty::method,
         type_of_fn_full(bcx_ccx(bcx), sp,
                         ty::ty_fn_proto(bcx_tcx(bcx), outer_mthd_ty), true,
                         m.inputs, m.output,
-                        std::vec::len[ast::ty_param](ty_params));
+                        std::vec::len::<ast::ty_param>(ty_params));
     llouter_mthd =
         bcx.build.PointerCast(llouter_mthd, T_ptr(T_ptr(llouter_mthd_ty)));
     llouter_mthd = bcx.build.Load(llouter_mthd);
@@ -747,7 +747,7 @@ fn process_fwding_mthd(cx: @local_ctxt, sp: &span, m: @ty::method,
     // Get the forwarding function's type and declare it.
     let llforwarding_fn_ty: TypeRef =
         type_of_fn_full(cx.ccx, sp, m.proto, true, m.inputs, m.output,
-                        std::vec::len[ast::ty_param](ty_params));
+                        std::vec::len::<ast::ty_param>(ty_params));
     let llforwarding_fn: ValueRef =
         decl_internal_fastcall_fn(cx.ccx.llmod, s, llforwarding_fn_ty);
 
@@ -844,7 +844,7 @@ fn process_fwding_mthd(cx: @local_ctxt, sp: &span, m: @ty::method,
         type_of_fn_full(bcx_ccx(bcx), sp,
                         ty::ty_fn_proto(bcx_tcx(bcx), orig_mthd_ty), true,
                         m.inputs, m.output,
-                        std::vec::len[ast::ty_param](ty_params));
+                        std::vec::len::<ast::ty_param>(ty_params));
     llorig_mthd =
         bcx.build.PointerCast(llorig_mthd, T_ptr(T_ptr(llorig_mthd_ty)));
     llorig_mthd = bcx.build.Load(llorig_mthd);
@@ -923,7 +923,7 @@ fn process_normal_mthd(cx: @local_ctxt, m: @ast::method, self_ty: ty::t,
       ty::ty_fn(proto, inputs, output, _, _) {
         llfnty =
             type_of_fn_full(cx.ccx, m.span, proto, true, inputs, output,
-                            std::vec::len[ast::ty_param](ty_params));
+                            std::vec::len::<ast::ty_param>(ty_params));
       }
     }
     let mcx: @local_ctxt =
index f213dc9feb857d6216677827f011f55703d5b98e..30799bdbc950971e49d6f580ca3d695d38e78cbf 100644 (file)
@@ -170,8 +170,8 @@ fn log_states_err(pp: &pre_and_post_state) {
 fn print_ident(i: &ident) { log " " + i + " "; }
 
 fn print_idents(idents: &mutable [ident]) {
-    if vec::len[ident](idents) == 0u { ret; }
-    log "an ident: " + vec::pop[ident](idents);
+    if vec::len::<ident>(idents) == 0u { ret; }
+    log "an ident: " + vec::pop::<ident>(idents);
     print_idents(idents);
 }
 
@@ -320,8 +320,8 @@ fn add_node(ccx: &crate_ctxt, i: node_id, a: &ts_ann) {
 
 fn get_ts_ann(ccx: &crate_ctxt, i: node_id) -> option::t<ts_ann> {
     if i as uint < vec::len(*ccx.node_anns) {
-        ret some[ts_ann](ccx.node_anns.(i));
-    } else { ret none[ts_ann]; }
+        ret some::<ts_ann>(ccx.node_anns.(i));
+    } else { ret none::<ts_ann>; }
 }
 
 
@@ -508,7 +508,7 @@ fn pure_exp(ccx: &crate_ctxt, id: node_id, p: &prestate) -> bool {
 
 fn new_crate_ctxt(cx: ty::ctxt) -> crate_ctxt {
     let na: [mutable ts_ann] = ~[mutable];
-    ret {tcx: cx, node_anns: @mutable na, fm: @new_int_hash[fn_info]()};
+    ret {tcx: cx, node_anns: @mutable na, fm: @new_int_hash::<fn_info>()};
 }
 
 /* Use e's type to determine whether it returns.
index f61604e1ec4942183532bec36e6bebc7175cb36a..7ead3a9d8362ccdb0527193f1a563a8fc5582bec 100644 (file)
@@ -160,7 +160,7 @@ fn relax_precond_block_inner(b: &blk, cx: &relax_ctxt,
 
 fn relax_precond_block(fcx: &fn_ctxt, i: node_id, b:&blk) {
     let cx = {fcx: fcx, i: i};
-    let visitor = visit::default_visitor[relax_ctxt]();
+    let visitor = visit::default_visitor::<relax_ctxt>();
     visitor =
         @{visit_block: relax_precond_block_inner,
           visit_expr: relax_precond_expr,
index 061ccd4811dc1201ed05be08a0c10e5685075850..00b5ba3d7ecbf94a23b6053f279a10d945dd1cb1 100644 (file)
@@ -131,7 +131,7 @@ fn check_states_against_conditions(fcx: &fn_ctxt, f: &_fn,
        because we want the smallest possible erroneous statement
        or expression. */
 
-    let visitor = visit::default_visitor[fn_ctxt]();
+    let visitor = visit::default_visitor::<fn_ctxt>();
 
     visitor =
         @{visit_stmt: check_states_stmt,
@@ -205,7 +205,7 @@ fn check_crate(cx: ty::ctxt, crate: @crate) {
     annotate_crate(ccx, *crate);
     /* Compute the pre and postcondition for every subexpression */
 
-    let vtor = visit::default_visitor[crate_ctxt]();
+    let vtor = visit::default_visitor::<crate_ctxt>();
     vtor = @{visit_fn: fn_pre_post with *vtor};
     visit::visit_crate(*crate, ccx, visit::mk_vt(vtor));
 
index 912bf1bd5e85b47cb273dfa80cdb2e334501e17e..ad975f54216c2b96cf03a39ed56ac264b07b06fb 100644 (file)
@@ -46,7 +46,7 @@ fn collect_pred(e: &@expr, cx: &ctxt, v: &visit::vt<ctxt>) {
 fn find_locals(tcx: &ty::ctxt, f: &_fn, tps: &[ty_param], sp: &span,
                i: &fn_ident, id: node_id) -> ctxt {
     let cx: ctxt = {cs: @mutable ~[], tcx: tcx};
-    let visitor = visit::default_visitor[ctxt]();
+    let visitor = visit::default_visitor::<ctxt>();
 
     visitor =
         @{visit_local: collect_local,
@@ -91,7 +91,7 @@ fn add_constraint(tcx: &ty::ctxt, c: sp_constr, next: uint, tbl: constr_map)
 fn mk_fn_info(ccx: &crate_ctxt, f: &_fn, tp: &[ty_param], f_sp: &span,
               f_name: &fn_ident, id: node_id) {
     let name = fn_ident_to_string(id, f_name);
-    let res_map = @new_def_hash[constraint]();
+    let res_map = @new_def_hash::<constraint>();
     let next: uint = 0u;
 
     let cx: ctxt = find_locals(ccx.tcx, f, tp, f_sp, f_name, id);
index 9f7678878df157c33aecffc7a00f196ea5f20da4..5f6d0dcdf01c639a9b8159f1c95c7d16872244f7 100644 (file)
@@ -75,7 +75,7 @@ fn find_pre_post_item(ccx: &crate_ctxt, i: &item) {
         let v: @mutable [node_id] = @mutable ~[];
         let fake_fcx =
             {enclosing:
-                 {constrs: @new_def_hash[constraint](),
+                 {constrs: @new_def_hash::<constraint>(),
                   num_constraints: 0u,
                   cf: return,
                   // just bogus
@@ -115,7 +115,7 @@ fn find_pre_post_item(ccx: &crate_ctxt, i: &item) {
    the preconditions for <args>, and the postcondition in a to
    be the union of all postconditions for <args> */
 fn find_pre_post_exprs(fcx: &fn_ctxt, args: &[@expr], id: node_id) {
-    if vec::len[@expr](args) > 0u {
+    if vec::len::<@expr>(args) > 0u {
         log "find_pre_post_exprs: oper =";
         log_expr(*args.(0));
     }
@@ -125,7 +125,7 @@ fn find_pre_post_exprs(fcx: &fn_ctxt, args: &[@expr], id: node_id) {
     fn get_pp(ccx: crate_ctxt, e: &@expr) -> pre_and_post {
         ret expr_pp(ccx, e);
     }
-    let pps = vec::map[@expr, pre_and_post](bind get_pp(fcx.ccx, _), args);
+    let pps = vec::map::<@expr, pre_and_post>(bind get_pp(fcx.ccx, _), args);
 
     set_pre_and_post(fcx.ccx, id, seq_preconds(fcx, pps),
                      seq_postconds(fcx, vec::map(get_post, pps)));
@@ -509,7 +509,7 @@ fn combine_pp(antec: pre_and_post, fcx: fn_ctxt, pp: &pre_and_post,
               postcondition: false_postcond(num_local_vars)};
         let g = bind combine_pp(antec_pp, fcx, _, _);
         let alts_overall_pp =
-            vec::foldl[pre_and_post, pre_and_post](g, e_pp, alt_pps);
+            vec::foldl::<pre_and_post, pre_and_post>(g, e_pp, alt_pps);
         set_pre_and_post(fcx.ccx, e.id, alts_overall_pp.precondition,
                          alts_overall_pp.postcondition);
       }
@@ -680,7 +680,7 @@ fn do_one_(fcx: fn_ctxt, s: &@stmt) {
     for s: @stmt in b.node.stmts { do_one_(fcx, s); }
     fn do_inner_(fcx: fn_ctxt, e: &@expr) { find_pre_post_expr(fcx, e); }
     let do_inner = bind do_inner_(fcx, _);
-    option::map[@expr, ()](do_inner, b.node.expr);
+    option::map::<@expr, ()>(do_inner, b.node.expr);
 
     let pps: [pre_and_post] = ~[];
     for s: @stmt in b.node.stmts { pps += ~[stmt_pp(fcx.ccx, *s)]; }
index 001505b4b28cf3b919dc81369981cd5d697c7ae0..c7de964bb8d3aca7900a9c5627fcc32bc7fc8a5d 100644 (file)
@@ -398,9 +398,9 @@ fn eq_cache_entries(a: &val, b: &val) -> bool {
 fn mk_ctxt(s: session::session, dm: resolve::def_map, amap: ast_map::map,
            freevars: freevars::freevar_map) -> ctxt {
     let ntt: node_type_table =
-        @smallintmap::mk[ty::ty_param_substs_opt_and_ty]();
-    let tcache = new_def_hash[ty::ty_param_kinds_and_ty]();
-    let ts = @interner::mk[@raw_t](hash_raw_ty, eq_raw_ty);
+        @smallintmap::mk::<ty::ty_param_substs_opt_and_ty>();
+    let tcache = new_def_hash::<ty::ty_param_kinds_and_ty>();
+    let ts = @interner::mk::<@raw_t>(hash_raw_ty, eq_raw_ty);
     let cx =
         @{ts: ts,
           sess: s,
@@ -428,7 +428,7 @@ fn mk_raw_ty(cx: &ctxt, st: &sty, in_cname: &option::t<str>) -> @raw_t {
     let has_vars: bool = false;
     fn derive_flags_t(cx: &ctxt, has_params: &mutable bool,
                       has_vars: &mutable bool, tt: &t) {
-        let rt = interner::get[@raw_t](*cx.ts, tt);
+        let rt = interner::get::<@raw_t>(*cx.ts, tt);
         has_params = has_params || rt.has_params;
         has_vars = has_vars || rt.has_vars;
     }
@@ -1148,7 +1148,7 @@ fn type_has_dynamic_size(cx: &ctxt, ty: &t) -> bool {
       ty_istr. { ret false; }
       ty_tag(_, subtys) {
         let i = 0u;
-        while i < vec::len[t](subtys) {
+        while i < vec::len::<t>(subtys) {
             if type_has_dynamic_size(cx, subtys.(i)) { ret true; }
             i += 1u;
         }
@@ -1160,7 +1160,7 @@ fn type_has_dynamic_size(cx: &ctxt, ty: &t) -> bool {
       ty_ptr(_) { ret false; }
       ty_rec(fields) {
         let i = 0u;
-        while i < vec::len[field](fields) {
+        while i < vec::len::<field>(fields) {
             if type_has_dynamic_size(cx, fields.(i).mt.ty) { ret true; }
             i += 1u;
         }
@@ -1599,8 +1599,8 @@ fn equal_mt(a: &mt, b: &mt) -> bool {
     fn equal_fn(args_a: &[arg], rty_a: &t, args_b: &[arg], rty_b: &t) ->
        bool {
         if !eq_ty(rty_a, rty_b) { ret false; }
-        let len = vec::len[arg](args_a);
-        if len != vec::len[arg](args_b) { ret false; }
+        let len = vec::len::<arg>(args_a);
+        if len != vec::len::<arg>(args_b) { ret false; }
         let i = 0u;
         while i < len {
             let arg_a = args_a.(i);
@@ -1636,8 +1636,8 @@ fn equal_def(did_a: &ast::def_id, did_b: &ast::def_id) -> bool {
         alt b {
           ty_tag(id_b, tys_b) {
             if !equal_def(id_a, id_b) { ret false; }
-            let len = vec::len[t](tys_a);
-            if len != vec::len[t](tys_b) { ret false; }
+            let len = vec::len::<t>(tys_a);
+            if len != vec::len::<t>(tys_b) { ret false; }
             let i = 0u;
             while i < len {
                 if !eq_ty(tys_a.(i), tys_b.(i)) { ret false; }
@@ -1663,8 +1663,8 @@ fn equal_def(did_a: &ast::def_id, did_b: &ast::def_id) -> bool {
       ty_rec(flds_a) {
         alt b {
           ty_rec(flds_b) {
-            let len = vec::len[field](flds_a);
-            if len != vec::len[field](flds_b) { ret false; }
+            let len = vec::len::<field>(flds_a);
+            if len != vec::len::<field>(flds_b) { ret false; }
             let i = 0u;
             while i < len {
                 let fld_a = flds_a.(i);
@@ -1716,8 +1716,8 @@ fn equal_def(did_a: &ast::def_id, did_b: &ast::def_id) -> bool {
       ty_obj(methods_a) {
         alt b {
           ty_obj(methods_b) {
-            let len = vec::len[method](methods_a);
-            if len != vec::len[method](methods_b) { ret false; }
+            let len = vec::len::<method>(methods_a);
+            if len != vec::len::<method>(methods_b) { ret false; }
             let i = 0u;
             while i < len {
                 let m_a = methods_a.(i);
@@ -1874,7 +1874,7 @@ fn counter(cx: &ctxt, param_indices: @mutable [uint], ty: t) {
     let param_indices: @mutable [uint] = @mutable ~[];
     let f = bind counter(cx, param_indices, _);
     walk_ty(cx, f, ty);
-    ret vec::len[uint](*param_indices);
+    ret vec::len::<uint>(*param_indices);
 }
 
 fn type_contains_vars(cx: &ctxt, typ: &t) -> bool {
@@ -1995,7 +1995,7 @@ fn sort_methods(meths: &[method]) -> [method] {
     fn method_lteq(a: &method, b: &method) -> bool {
         ret str::lteq(a.ident, b.ident);
     }
-    ret std::sort::merge_sort[method](bind method_lteq(_, _), meths);
+    ret std::sort::merge_sort::<method>(bind method_lteq(_, _), meths);
 }
 
 fn is_lval(expr: &@ast::expr) -> bool {
@@ -2071,7 +2071,7 @@ mod unify {
     type ctxt = {vb: @var_bindings, tcx: ty_ctxt};
 
     fn mk_var_bindings() -> @var_bindings {
-        ret @{sets: ufind::make(), types: smallintmap::mk[t]()};
+        ret @{sets: ufind::make(), types: smallintmap::mk::<t>()};
     }
 
     // Unifies two sets.
@@ -2084,7 +2084,7 @@ fn union(cx: &@ctxt, set_a: uint, set_b: uint) -> union_result {
             bind fn (cx: &@ctxt, t: t, set_a: uint, set_b: uint) {
                      ufind::union(cx.vb.sets, set_a, set_b);
                      let root_c: uint = ufind::find(cx.vb.sets, set_a);
-                     smallintmap::insert[t](cx.vb.types, root_c, t);
+                     smallintmap::insert::<t>(cx.vb.types, root_c, t);
                  }(_, _, set_a, set_b);
 
 
@@ -2115,7 +2115,7 @@ fn record_var_binding(cx: &@ctxt, key: int, typ: t) -> result {
         ufind::grow(cx.vb.sets, (key as uint) + 1u);
         let root = ufind::find(cx.vb.sets, key as uint);
         let result_type = typ;
-        alt smallintmap::find[t](cx.vb.types, root) {
+        alt smallintmap::find::<t>(cx.vb.types, root) {
           some(old_type) {
             alt unify_step(cx, old_type, typ) {
               ures_ok(unified_type) { result_type = unified_type; }
@@ -2124,7 +2124,7 @@ fn record_var_binding(cx: &@ctxt, key: int, typ: t) -> result {
           }
           none. {/* fall through */ }
         }
-        smallintmap::insert[t](cx.vb.types, root, result_type);
+        smallintmap::insert::<t>(cx.vb.types, root, result_type);
         ret ures_ok(typ);
     }
 
@@ -2212,8 +2212,8 @@ fn unify_fn_common(cx: &@ctxt, expected: &t, actual: &t,
                        expected_inputs: &[arg], expected_output: &t,
                        actual_inputs: &[arg], actual_output: &t) ->
        fn_common_res {
-        let expected_len = vec::len[arg](expected_inputs);
-        let actual_len = vec::len[arg](actual_inputs);
+        let expected_len = vec::len::<arg>(expected_inputs);
+        let actual_len = vec::len::<arg>(actual_inputs);
         if expected_len != actual_len {
             ret fn_common_res_err(ures_err(terr_arg_count));
         }
@@ -2309,8 +2309,8 @@ fn unify_obj(cx: &@ctxt, expected: &t, actual: &t,
        result {
         let result_meths: [method] = ~[];
         let i: uint = 0u;
-        let expected_len: uint = vec::len[method](expected_meths);
-        let actual_len: uint = vec::len[method](actual_meths);
+        let expected_len: uint = vec::len::<method>(expected_meths);
+        let actual_len: uint = vec::len::<method>(actual_meths);
         if expected_len != actual_len { ret ures_err(terr_meth_count); }
         while i < expected_len {
             let e_meth = expected_meths.(i);
@@ -2350,7 +2350,7 @@ fn resolve_type_structure(tcx: &ty_ctxt, vb: &@var_bindings, typ: t) ->
                 ret fix_err(vid);
             }
             let root_id = ufind::find(vb.sets, vid as uint);
-            alt smallintmap::find[t](vb.types, root_id) {
+            alt smallintmap::find::<t>(vb.types, root_id) {
               none. { ret fix_err(vid); }
               some(rt) { ret fix_ok(rt); }
             }
@@ -2451,7 +2451,7 @@ fn unify_step(cx: &@ctxt, expected: &t, actual: &t) -> result {
                 // TODO: factor this cruft out
                 let result_tps: [t] = ~[];
                 let i = 0u;
-                let expected_len = vec::len[t](expected_tps);
+                let expected_len = vec::len::<t>(expected_tps);
                 while i < expected_len {
                     let expected_tp = expected_tps.(i);
                     let actual_tp = actual_tps.(i);
@@ -2592,8 +2592,8 @@ fn unify_step(cx: &@ctxt, expected: &t, actual: &t) -> result {
           ty::ty_rec(expected_fields) {
             alt struct(cx.tcx, actual) {
               ty::ty_rec(actual_fields) {
-                let expected_len = vec::len[field](expected_fields);
-                let actual_len = vec::len[field](actual_fields);
+                let expected_len = vec::len::<field>(expected_fields);
+                let actual_len = vec::len::<field>(actual_fields);
                 if expected_len != actual_len {
                     let err = terr_record_size(expected_len, actual_len);
                     ret ures_err(err);
@@ -2733,17 +2733,17 @@ fn unify(expected: &t, actual: &t, vb: &@var_bindings, tcx: &ty_ctxt) ->
     }
     fn dump_var_bindings(tcx: ty_ctxt, vb: @var_bindings) {
         let i = 0u;
-        while i < vec::len[ufind::node](vb.sets.nodes) {
+        while i < vec::len::<ufind::node>(vb.sets.nodes) {
             let sets = "";
             let j = 0u;
-            while j < vec::len[option::t<uint>](vb.sets.nodes) {
+            while j < vec::len::<option::t<uint>>(vb.sets.nodes) {
                 if ufind::find(vb.sets, j) == i {
                     sets += #fmt(" %u", j);
                 }
                 j += 1u;
             }
             let typespec;
-            alt smallintmap::find[t](vb.types, i) {
+            alt smallintmap::find::<t>(vb.types, i) {
               none. { typespec = ""; }
               some(typ) { typespec = " =" + ty_to_str(tcx, typ); }
             }
@@ -2767,7 +2767,7 @@ fn subst_vars(tcx: ty_ctxt, sp: &option::t<span>, vb: @var_bindings,
                 ret ty::mk_var(tcx, vid);
             }
             let root_id = ufind::find(vb.sets, vid as uint);
-            alt smallintmap::find[t](vb.types, root_id) {
+            alt smallintmap::find::<t>(vb.types, root_id) {
               none. { *unresolved = some(vid); ret ty::mk_var(tcx, vid); }
               some(rt) {
                 if occurs_check_fails(tcx, sp, vid, rt) {
@@ -2779,7 +2779,7 @@ fn subst_vars(tcx: ty_ctxt, sp: &option::t<span>, vb: @var_bindings,
               }
             }
         }
-        let unresolved = @mutable none[int];
+        let unresolved = @mutable none::<int>;
         let rty =
             fold_ty(tcx, fm_var(bind subst_vars(tcx, sp, vb, unresolved, _)),
                     typ);
@@ -2794,7 +2794,7 @@ fn resolve_type_var(tcx: &ty_ctxt, sp: &option::t<span>,
        fixup_result {
         if vid as uint >= ufind::set_count(vb.sets) { ret fix_err(vid); }
         let root_id = ufind::find(vb.sets, vid as uint);
-        alt smallintmap::find[t](vb.types, root_id) {
+        alt smallintmap::find::<t>(vb.types, root_id) {
           none. { ret fix_err(vid); }
           some(rt) { ret fixup_vars(tcx, sp, vb, rt); }
         }
@@ -2947,7 +2947,7 @@ fn tag_variant_with_id(cx: &ctxt, tag_id: &ast::def_id,
                        variant_id: &ast::def_id) -> variant_info {
     let variants = tag_variants(cx, tag_id);
     let i = 0u;
-    while i < vec::len[variant_info](variants) {
+    while i < vec::len::<variant_info>(variants) {
         let variant = variants.(i);
         if def_eq(variant.id, variant_id) { ret variant; }
         i += 1u;
index 4dcd6e7dc675b958f8ae210238df2bc272dc8231..13d5fef9ded56a430fd114e0bdc240fd805910d2 100644 (file)
@@ -164,7 +164,7 @@ fn instantiate_path(fcx: &@fn_ctxt, pth: &ast::path,
                             ty_param_count);
     let ty_param_vars = bind_result.ids;
     let ty_substs_opt;
-    let ty_substs_len = vec::len[@ast::ty](pth.node.types);
+    let ty_substs_len = vec::len::<@ast::ty>(pth.node.types);
     if ty_substs_len > 0u {
         let param_var_len = vec::len(ty_param_vars);
         if param_var_len == 0u {
@@ -186,7 +186,7 @@ fn instantiate_path(fcx: &@fn_ctxt, pth: &ast::path,
             ty_substs += ~[res_ty];
             i += 1u;
         }
-        ty_substs_opt = some[[ty::t]](ty_substs);
+        ty_substs_opt = some::<[ty::t]>(ty_substs);
         if ty_param_count == 0u {
             fcx.ccx.tcx.sess.span_fatal(sp,
                                         "this item does not take type \
@@ -200,7 +200,7 @@ fn instantiate_path(fcx: &@fn_ctxt, pth: &ast::path,
             ty_substs += ~[ty::mk_var(fcx.ccx.tcx, ty_param_vars.(i))];
             i += 1u;
         }
-        ty_substs_opt = some[[ty::t]](ty_substs);
+        ty_substs_opt = some::<[ty::t]>(ty_substs);
     }
     ret {substs: ty_substs_opt, ty: tpt.ty};
 }
@@ -271,7 +271,7 @@ fn ast_ty_to_ty(tcx: &ty::ctxt, getter: &ty_getter, ast_ty: &@ast::ty) ->
       none. { }
     } /* go on */
 
-    tcx.ast_ty_to_ty_cache.insert(ast_ty, none[ty::t]);
+    tcx.ast_ty_to_ty_cache.insert(ast_ty, none::<ty::t>);
     fn ast_arg_to_arg(tcx: &ty::ctxt, getter: &ty_getter, arg: &ast::ty_arg)
        -> {mode: ty::mode, ty: ty::t} {
         let ty_mode = ast_mode_to_mode(arg.node.mode);
@@ -309,7 +309,7 @@ fn instantiate(tcx: &ty::ctxt, sp: &span, getter: &ty_getter,
         ret typ;
     }
     let typ;
-    let cname = none[str];
+    let cname = none::<str>;
     alt ast_ty.node {
       ast::ty_nil. { typ = ty::mk_nil(tcx); }
       ast::ty_bot. { typ = ty::mk_bot(tcx); }
@@ -476,23 +476,23 @@ fn ty_fixup(fcx: @fn_ctxt, node_id: ast::node_id,
 
     // Writes a type with no type parameters into the node type table.
     fn ty_only(tcx: &ty::ctxt, node_id: ast::node_id, typ: ty::t) {
-        ty(tcx, node_id, {substs: none[[ty::t]], ty: typ});
+        ty(tcx, node_id, {substs: none::<[ty::t]>, ty: typ});
     }
 
     // Writes a type with no type parameters into the node type table. This
     // function allows for the possibility of type variables.
     fn ty_only_fixup(fcx: @fn_ctxt, node_id: ast::node_id, typ: ty::t) {
-        ret ty_fixup(fcx, node_id, {substs: none[[ty::t]], ty: typ});
+        ret ty_fixup(fcx, node_id, {substs: none::<[ty::t]>, ty: typ});
     }
 
     // Writes a nil type into the node type table.
     fn nil_ty(tcx: &ty::ctxt, node_id: ast::node_id) {
-        ret ty(tcx, node_id, {substs: none[[ty::t]], ty: ty::mk_nil(tcx)});
+        ret ty(tcx, node_id, {substs: none::<[ty::t]>, ty: ty::mk_nil(tcx)});
     }
 
     // Writes the bottom type into the node type table.
     fn bot_ty(tcx: &ty::ctxt, node_id: ast::node_id) {
-        ret ty(tcx, node_id, {substs: none[[ty::t]], ty: ty::mk_bot(tcx)});
+        ret ty(tcx, node_id, {substs: none::<[ty::t]>, ty: ty::mk_bot(tcx)});
     }
 }
 
@@ -745,7 +745,7 @@ fn get_tag_variant_types(cx: &@ctxt, tag_id: &ast::def_id,
             // constructors get turned into functions.
 
             let result_ty;
-            if vec::len[ast::variant_arg](variant.node.args) == 0u {
+            if vec::len::<ast::variant_arg>(variant.node.args) == 0u {
                 result_ty = ty::mk_tag(cx.tcx, tag_id, ty_param_tys);
             } else {
                 // As above, tell ast_ty_to_ty() that trans_ty_item_to_ty()
@@ -784,7 +784,7 @@ fn convert(cx: @ctxt, abi: @mutable option::t<ast::native_abi>,
           ast::item_native_mod(native_mod) {
             // Propagate the native ABI down to convert_native() below,
             // but otherwise do nothing, as native modules have no types.
-            *abi = some[ast::native_abi](native_mod.abi);
+            *abi = some::<ast::native_abi>(native_mod.abi);
           }
           ast::item_tag(variants, ty_params) {
             let tpt = ty_of_item(cx, it);
@@ -806,7 +806,7 @@ fn convert(cx: @ctxt, abi: @mutable option::t<ast::native_abi>,
             // ty_of_obj().)
             let method_types = get_obj_method_types(cx, object);
             let i = 0u;
-            while i < vec::len[@ast::method](object.methods) {
+            while i < vec::len::<@ast::method>(object.methods) {
                 write::ty_only(cx.tcx, object.methods.(i).node.id,
                                ty::method_ty_to_fn_ty(cx.tcx,
                                                       method_types.(i)));
@@ -818,7 +818,7 @@ fn convert(cx: @ctxt, abi: @mutable option::t<ast::native_abi>,
             // an assertion in trans.
             let args = ty::ty_fn_args(cx.tcx, tpt.ty);
             i = 0u;
-            while i < vec::len[ty::arg](args) {
+            while i < vec::len::<ty::arg>(args) {
                 let fld = object.fields.(i);
                 write::ty_only(cx.tcx, fld.id, args.(i).ty);
                 i += 1u;
@@ -856,7 +856,8 @@ fn convert_native(cx: @ctxt, abi: @mutable option::t<ast::native_abi>,
         // type of the native item. We simply write it into the node type
         // table.
         let tpt =
-            ty_of_native_item(cx, i, option::get[ast::native_abi]({ *abi }));
+            ty_of_native_item(cx, i,
+                              option::get::<ast::native_abi>({ *abi }));
         alt i.node {
           ast::native_item_ty. {
             // FIXME: Native types have no annotation. Should they? --pcw
@@ -869,7 +870,7 @@ fn convert_native(cx: @ctxt, abi: @mutable option::t<ast::native_abi>,
     fn collect_item_types(tcx: &ty::ctxt, crate: &@ast::crate) {
         // We have to propagate the surrounding ABI to the native items
         // contained within the native module.
-        let abi = @mutable none[ast::native_abi];
+        let abi = @mutable none::<ast::native_abi>;
         let cx = @{tcx: tcx};
         let visit = visit::mk_simple_visitor
             (@{visit_item: bind convert(cx, abi, _),
@@ -1101,8 +1102,8 @@ fn resolve_type_vars_for_node(wbcx: &wb_ctxt, sp: &span,
             };
         let new_substs_opt;
         alt tpot.substs {
-          none[[ty::t]]. { new_substs_opt = none[[ty::t]]; }
-          some[[ty::t]](substs) {
+          none::<[ty::t]>. { new_substs_opt = none::<[ty::t]>; }
+          some::<[ty::t]>(substs) {
             let new_substs: [ty::t] = ~[];
             for subst: ty::t in substs {
                 alt resolve_type_vars_in_type(fcx, sp, subst) {
@@ -1110,7 +1111,7 @@ fn resolve_type_vars_for_node(wbcx: &wb_ctxt, sp: &span,
                   none. { wbcx.success = false; ret; }
                 }
             }
-            new_substs_opt = some[[ty::t]](new_substs);
+            new_substs_opt = some::<[ty::t]>(new_substs);
           }
         }
         write::ty(fcx.ccx.tcx, id, {substs: new_substs_opt, ty: new_ty});
@@ -1207,8 +1208,8 @@ fn gather_locals(ccx: &@crate_ctxt, f: &ast::_fn, id: &ast::node_id,
     let {vb, locals, local_names, nvi} = alt old_fcx {
       none. {
         { vb: ty::unify::mk_var_bindings(),
-          locals: new_int_hash[int](),
-          local_names: new_int_hash[ast::ident](),
+          locals: new_int_hash::<int>(),
+          local_names: new_int_hash::<ast::ident>(),
           nvi: @mutable 0 }
       }
       some(fcx) {
@@ -1357,17 +1358,17 @@ fn check_pat(fcx: &@fn_ctxt, map: &ast::pat_id_map, pat: &@ast::pat,
                 demand::with_substs(fcx, pat.span, expected, ctor_ty,
                                     expected_tps);
             path_tpot =
-                {substs: some[[ty::t]](path_tpt.substs), ty: path_tpt.ty};
+                {substs: some::<[ty::t]>(path_tpt.substs), ty: path_tpt.ty};
 
             // Get the number of arguments in this tag variant.
             let arg_types =
                 variant_arg_types(fcx.ccx, pat.span, v_def_ids.var,
                                   expected_tps);
-            let subpats_len = std::vec::len[@ast::pat](subpats);
-            if std::vec::len[ty::t](arg_types) > 0u {
+            let subpats_len = std::vec::len::<@ast::pat>(subpats);
+            if std::vec::len::<ty::t>(arg_types) > 0u {
                 // N-ary variant.
 
-                let arg_len = vec::len[ty::t](arg_types);
+                let arg_len = vec::len::<ty::t>(arg_types);
                 if arg_len != subpats_len {
                     // TODO: note definition of tag variant
                     // TODO (issue #448): Wrap a #fmt string over multiple
@@ -1586,8 +1587,8 @@ fn check_call_or_bind(fcx: &@fn_ctxt, sp: &span, f: &@ast::expr,
         }
 
         // Check that the correct number of arguments were supplied.
-        let expected_arg_count = vec::len[ty::arg](arg_tys);
-        let supplied_arg_count = vec::len[option::t<@ast::expr>](args);
+        let expected_arg_count = vec::len::<ty::arg>(arg_tys);
+        let supplied_arg_count = vec::len::<option::t<@ast::expr>>(args);
         if expected_arg_count != supplied_arg_count {
             fcx.ccx.tcx.sess.span_fatal(sp,
                                         #fmt("this function takes %u \
@@ -1649,7 +1650,7 @@ fn check_call(fcx: &@fn_ctxt, sp: &span, f: &@ast::expr,
                   args: &[@ast::expr], call_kind: call_kind) -> bool {
         let args_opt_0: [option::t<@ast::expr>] = ~[];
         for arg: @ast::expr in args {
-            args_opt_0 += ~[some[@ast::expr](arg)];
+            args_opt_0 += ~[some::<@ast::expr>(arg)];
         }
 
         // Call the generic checker.
@@ -1870,7 +1871,7 @@ fn check_binop_type_compat(fcx: &@fn_ctxt, span: span, ty: ty::t,
         } else {
             // The definition doesn't take type parameters. If the programmer
             // supplied some, that's an error.
-            if vec::len[@ast::ty](pth.node.types) > 0u {
+            if vec::len::<@ast::ty>(pth.node.types) > 0u {
                 tcx.sess.span_fatal(expr.span,
                                     "this kind of value does not \
                                      take type parameters");
@@ -2093,7 +2094,7 @@ fn check_binop_type_compat(fcx: &@fn_ctxt, span: span, ty: ty::t,
             // For each blank argument, add the type of that argument
             // to the resulting function type.
             let i = 0u;
-            while i < vec::len[option::t<@ast::expr>](args) {
+            while i < vec::len::<option::t<@ast::expr>>(args) {
                 alt args.(i) {
                   some(_) {/* no-op */ }
                   none. { arg_tys_1 += ~[arg_tys.(i)]; }
@@ -2259,7 +2260,7 @@ fn get_node(f: &spanned<field>) -> field { f.node }
           ty::ty_rec(fields) {
             let ix: uint =
                 ty::field_idx(tcx.sess, expr.span, field, fields);
-            if ix >= vec::len[ty::field](fields) {
+            if ix >= vec::len::<ty::field>(fields) {
                 tcx.sess.span_fatal(expr.span, "bad index on record");
             }
             write::ty_only_fixup(fcx, id, fields.(ix).mt.ty);
@@ -2267,7 +2268,7 @@ fn get_node(f: &spanned<field>) -> field { f.node }
           ty::ty_obj(methods) {
             let ix: uint =
                 ty::method_idx(tcx.sess, expr.span, field, methods);
-            if ix >= vec::len[ty::method](methods) {
+            if ix >= vec::len::<ty::method>(methods) {
                 tcx.sess.span_fatal(expr.span, "bad index on obj");
             }
             let meth = methods.(ix);
@@ -2420,8 +2421,8 @@ fn filtering_fn(ccx: @crate_ctxt,
 
             let f = bind filtering_fn(fcx.ccx, _, ao.methods);
             inner_obj_methods =
-                std::vec::filter_map[ty::method,
-                                      ty::method](f, inner_obj_methods);
+                std::vec::filter_map::<ty::method,
+                                       ty::method>(f, inner_obj_methods);
 
             method_types += inner_obj_methods;
         }
@@ -2433,7 +2434,7 @@ fn filtering_fn(ccx: @crate_ctxt,
         // Write the methods into the node type table.  (This happens in
         // collect::convert for regular objects.)
         let i = 0u;
-        while i < vec::len[@ast::method](ao.methods) {
+        while i < vec::len::<@ast::method>(ao.methods) {
             write::ty_only(tcx, ao.methods.(i).node.id,
                            ty::method_ty_to_fn_ty(tcx,
                                                   method_types.(i)));
@@ -2446,7 +2447,7 @@ fn filtering_fn(ccx: @crate_ctxt,
         }
 
         // Now remove the info from the stack.
-        vec::pop[obj_info](fcx.ccx.obj_infos);
+        vec::pop::<obj_info>(fcx.ccx.obj_infos);
       }
       ast::expr_uniq(x) {
         let t = next_ty_var(fcx);
@@ -2474,7 +2475,7 @@ fn next_ty_var(fcx: &@fn_ctxt) -> ty::t {
 }
 
 fn get_obj_info(ccx: &@crate_ctxt) -> option::t<obj_info> {
-    ret vec::last[obj_info](ccx.obj_infos);
+    ret vec::last::<obj_info>(ccx.obj_infos);
 }
 
 fn check_decl_initializer(fcx: &@fn_ctxt, nid: ast::node_id,
@@ -2569,8 +2570,8 @@ fn check_const(ccx: &@crate_ctxt, sp: &span, e: &@ast::expr,
           purity: ast::pure_fn,
           proto: ast::proto_fn,
           var_bindings: ty::unify::mk_var_bindings(),
-          locals: new_int_hash[int](),
-          local_names: new_int_hash[ast::ident](),
+          locals: new_int_hash::<int>(),
+          local_names: new_int_hash::<ast::ident>(),
           next_var_id: @mutable 0,
           mutable fixups: fixups,
           ccx: ccx};
@@ -2653,7 +2654,7 @@ fn check_item(ccx: @crate_ctxt, it: &@ast::item) {
         for method: @ast::method in ob.methods { check_method(ccx, method); }
 
         // Now remove the info from the stack.
-        vec::pop[obj_info](ccx.obj_infos);
+        vec::pop::<obj_info>(ccx.obj_infos);
       }
       _ {/* nothing to do */ }
     }
index 5500d7a3e68ced02b7377ac9b94bff18000ce8f5..9fedd515620bb1237206e9b1e170711e1731c17c 100644 (file)
@@ -142,7 +142,7 @@ fn def_id_of_def(d: def) -> def_id {
 // This is used because same-named variables in alternative patterns need to
 // use the node_id of their namesake in the first pattern.
 fn pat_id_map(pat: &@pat) -> pat_id_map {
-    let map = std::map::new_str_hash[node_id]();
+    let map = std::map::new_str_hash::<node_id>();
     for each bound in pat_bindings(pat) {
         let name = alt bound.node { pat_bind(n) { n } };
         map.insert(name, bound.id);
@@ -661,7 +661,7 @@ fn is_constraint_arg(e: @expr) -> bool {
 fn hash_ty(t: &@ty) -> uint { ret t.span.lo << 16u + t.span.hi; }
 
 fn block_from_expr(e: @expr) -> blk {
-    let blk_ = {stmts: ~[], expr: option::some[@expr](e), id: e.id};
+    let blk_ = {stmts: ~[], expr: option::some::<@expr>(e), id: e.id};
     ret {node: blk_, span: e.span};
 }
 
index 5a9b3ac1d190e1652312e226622ee2f8584649b3..9c0ea438678e966c5c95a8acd5348450bbb36873 100644 (file)
@@ -20,7 +20,7 @@
 // A temporary hard-coded map of methods for expanding syntax extension
 // AST nodes into full ASTs
 fn syntax_expander_table() -> hashmap<str, syntax_extension> {
-    let syntax_expanders = new_str_hash[syntax_extension]();
+    let syntax_expanders = new_str_hash::<syntax_extension>();
     syntax_expanders.insert("fmt", normal(ext::fmt::expand_syntax_ext));
     syntax_expanders.insert("env", normal(ext::env::expand_syntax_ext));
     syntax_expanders.insert("macro",
index 498792b80b0d2de34410c9d811fc78f495f7c28d..0ec14a1a39947468cfaeb2f703b741c0c74cc12c 100644 (file)
@@ -16,7 +16,7 @@ fn expand_syntax_ext(cx: &ext_ctxt, sp: codemap::span, arg: @ast::expr,
       ast::expr_vec(elts, _, _) { elts }
       _ { cx.span_fatal(sp, "#env requires arguments of the form `[...]`.") }
     };
-    if vec::len[@ast::expr](args) != 1u {
+    if vec::len::<@ast::expr>(args) != 1u {
         cx.span_fatal(sp, "malformed #env call");
     }
     // FIXME: if this was more thorough it would manufacture an
index fd0ba7d4d012043674093d34bc93e5c5d1305d98..2dd607d1cfb1a3a766e7d4732ac444618d9fd2c5 100644 (file)
@@ -21,7 +21,7 @@ fn expand_syntax_ext(cx: &ext_ctxt, sp: span, arg: @ast::expr,
       ast::expr_vec(elts, _, _) { elts }
       _ { cx.span_fatal(sp, "#fmt requires arguments of the form `[...]`.") }
     };
-    if vec::len[@ast::expr](args) == 0u {
+    if vec::len::<@ast::expr>(args) == 0u {
         cx.span_fatal(sp, "#fmt requires a format string");
     }
     let fmt =
@@ -93,7 +93,7 @@ fn make_rec_expr(cx: &ext_ctxt, sp: span,
                 {node: {mut: ast::imm, ident: ident, expr: val}, span: sp};
             astfields += ~[astfield];
         }
-        let recexpr = ast::expr_rec(astfields, option::none[@ast::expr]);
+        let recexpr = ast::expr_rec(astfields, option::none::<@ast::expr>);
         ret @{id: cx.next_id(), node: recexpr, span: sp};
     }
     fn make_path_vec(cx: &ext_ctxt, ident: str) -> [str] {
@@ -130,7 +130,7 @@ fn make_flags(cx: &ext_ctxt, sp: span, flags: &[flag]) ->
             // through the rec that these flags are a member of, so
             // this is a hack placeholder flag
 
-            if vec::len[@ast::expr](flagexprs) == 0u {
+            if vec::len::<@ast::expr>(flagexprs) == 0u {
                 flagexprs += ~[make_rt_path_expr(cx, sp, "flag_none")];
             }
             ret make_vec_expr(cx, sp, flagexprs);
@@ -307,7 +307,7 @@ fn log_conv(c: conv) {
     let fmt_sp = args.(0).span;
     let n = 0u;
     let tmp_expr = make_new_str(cx, sp, "");
-    let nargs = vec::len[@ast::expr](args);
+    let nargs = vec::len::<@ast::expr>(args);
     for pc: piece in pieces {
         alt pc {
           piece_string(s) {
index 841f8221e3ebcd470db169af2903af63cb2d5ed3..41ef3e976ea988a4d05675ec55d08635872cb4b2 100644 (file)
@@ -9,7 +9,7 @@ fn expand_syntax_ext(cx: &ext_ctxt, sp: codemap::span, arg: @ast::expr,
       ast::expr_vec(elts, _, _) { elts }
       _ { cx.span_fatal(sp, "#ident_to_str requires a vector argument .") }
     };
-    if vec::len[@ast::expr](args) != 1u {
+    if vec::len::<@ast::expr>(args) != 1u {
         cx.span_fatal(sp, "malformed #ident_to_str call");
     }
 
index 462f9d7ce0c09290e26dbac4cdf089cc88673e75..a0443aeee82901447aff621b46645726576c5180 100644 (file)
@@ -167,7 +167,7 @@ fn acumm_bindings(cx: &ext_ctxt, b_dest: &bindings, b_src: &bindings) { }
 
 fn pattern_to_selectors(cx: &ext_ctxt, e: @expr) -> binders {
     let res: binders =
-        {real_binders: new_str_hash[selector](),
+        {real_binders: new_str_hash::<selector>(),
          mutable literal_ast_matchers: ~[]};
     //this oughta return binders instead, but macro args are a sequence of
     //expressions, rather than a single expression
@@ -183,7 +183,7 @@ fn pattern_to_selectors(cx: &ext_ctxt, e: @expr) -> binders {
 selectors. */
 
 fn use_selectors_to_bind(b: &binders, e: @expr) -> option::t<bindings> {
-    let res = new_str_hash[arb_depth<matchable>]();
+    let res = new_str_hash::<arb_depth<matchable>>();
     //need to do this first, to check vec lengths.
     for sel: selector in b.literal_ast_matchers {
         alt sel(match_expr(e)) { none. { ret none; } _ { } }
@@ -262,7 +262,7 @@ fn follow_for_trans(cx: &ext_ctxt, mmaybe: &option::t<arb_depth<matchable>>,
 
 /* helper for transcribe_exprs: what vars from `b` occur in `e`? */
 iter free_vars(b: &bindings, e: @expr) -> ident {
-    let idents: hashmap<ident, ()> = new_str_hash[()]();
+    let idents: hashmap<ident, ()> = new_str_hash::<()>();
     fn mark_ident(i: &ident, fld: ast_fold, b: &bindings,
                   idents: &hashmap<ident, ()>) -> ident {
         if b.contains_key(i) { idents.insert(i, ()); }
index 5e6db11c9d2c187f5f630b6d8afecf3c269adbb1..eadb63f766cd94c24239c2a04265c63c6457b46e 100644 (file)
@@ -488,9 +488,9 @@ fn noop_fold_local(l: &local_, fld: ast_fold) -> local_ {
     ret {ty: fld.fold_ty(l.ty),
          pat: fld.fold_pat(l.pat),
          init: alt l.init {
-           option::none[initializer]. { l.init }
-           option::some[initializer](init) {
-             option::some[initializer]({op: init.op,
+           option::none::<initializer>. { l.init }
+           option::some::<initializer>(init) {
+             option::some::<initializer>({op: init.op,
                                         expr: fld.fold_expr(init.expr)})
            }
          },
index 2d92da322733ffadc5ebda776590cc16819276ea..ecf3cf87fa6781633682b9b29ddc41ca7c208c8c 100644 (file)
@@ -188,7 +188,7 @@ fn scan_exponent(rdr: &reader) -> option::t<str> {
         if str::byte_len(exponent) > 0u {
             ret some(rslt + exponent);
         } else { rdr.err("scan_exponent: bad fp literal"); fail; }
-    } else { ret none[str]; }
+    } else { ret none::<str>; }
 }
 
 fn scan_dec_digits(rdr: &reader) -> str {
@@ -301,14 +301,14 @@ fn scan_number(c: char, rdr: &reader) -> token::token {
 
             }
         } else {
-            ret token::LIT_FLOAT(interner::intern[str](*rdr.get_interner(),
+            ret token::LIT_FLOAT(interner::intern::<str>(*rdr.get_interner(),
                                                        float_str));
         }
     }
     let maybe_exponent = scan_exponent(rdr);
     alt maybe_exponent {
       some(s) {
-        ret token::LIT_FLOAT(interner::intern[str](*rdr.get_interner(),
+        ret token::LIT_FLOAT(interner::intern::<str>(*rdr.get_interner(),
                                                    dec_str + s));
       }
       none. { ret token::LIT_INT(accum_int); }
@@ -350,7 +350,7 @@ fn next_token_inner(rdr: &reader) -> token::token {
         }
         if str::eq(accum_str, "_") { ret token::UNDERSCORE; }
         let is_mod_name = c == ':' && rdr.next() == ':';
-        ret token::IDENT(interner::intern[str](*rdr.get_interner(),
+        ret token::IDENT(interner::intern::<str>(*rdr.get_interner(),
                                                accum_str), is_mod_name);
     }
     if is_dec_digit(c) { ret scan_number(c, rdr); }
@@ -510,7 +510,7 @@ fn binop(rdr: &reader, op: token::binop) -> token::token {
             }
         }
         rdr.bump();
-        ret token::LIT_STR(interner::intern[str](*rdr.get_interner(),
+        ret token::LIT_STR(interner::intern::<str>(*rdr.get_interner(),
                                                  accum_str));
       }
       '-' {
@@ -712,7 +712,7 @@ fn gather_comments_and_literals(cm: &codemap::codemap, path: str,
                                 srdr: io::reader) ->
    {cmnts: [cmnt], lits: [lit]} {
     let src = str::unsafe_from_bytes(srdr.read_whole_stream());
-    let itr = @interner::mk[str](str::hash, str::eq);
+    let itr = @interner::mk::<str>(str::hash, str::eq);
     let rdr = new_reader(cm, src, codemap::new_filemap(path, 0u, 0u), itr);
     let comments: [cmnt] = ~[];
     let literals: [lit] = ~[];
index aa5628b1bad0fc9845f26a6c8ecb6a4b0d61a5b6..2cd31d5b3c184a19203ff0fb809b1025ff098b03 100644 (file)
@@ -672,7 +672,7 @@ fn parse_seq_lt_gt<T>(sep: option::t<token::token>, f: fn(&parser) -> T,
                       p: &parser) -> spanned<[T]> {
     let lo = p.get_lo_pos();
     expect(p, token::LT);
-    let result = parse_seq_to_before_gt[T](sep, f, p);
+    let result = parse_seq_to_before_gt::<T>(sep, f, p);
     let hi = p.get_hi_pos();
     expect_gt(p);
     ret spanned(lo, hi, result);
@@ -705,7 +705,7 @@ fn parse_seq<T>(bra: token::token, ket: token::token,
                 p: &parser) -> spanned<[T]> {
     let lo = p.get_lo_pos();
     expect(p, bra);
-    let result = parse_seq_to_before_end[T](ket, sep, f, p);
+    let result = parse_seq_to_before_end::<T>(ket, sep, f, p);
     let hi = p.get_hi_pos();
     p.bump();
     ret spanned(lo, hi, result);
index b9faac40dc3051e857fdf29fe68926f0b146bb1c..64088ec8f0a18542cc1c4323616567b18c8c28fc 100644 (file)
@@ -153,12 +153,12 @@ fn to_str(r: lexer::reader, t: token) -> str {
         ret int::to_str(i, 10u) + "_" + ty_mach_to_str(tm);
       }
       LIT_MACH_FLOAT(tm, s) {
-        ret interner::get[str](*r.get_interner(), s) + "_" +
+        ret interner::get::<str>(*r.get_interner(), s) + "_" +
                 ty_mach_to_str(tm);
       }
-      LIT_FLOAT(s) { ret interner::get[str](*r.get_interner(), s); }
+      LIT_FLOAT(s) { ret interner::get::<str>(*r.get_interner(), s); }
       LIT_STR(s) { // FIXME: escape.
-        ret "\"" + interner::get[str](*r.get_interner(), s) + "\"";
+        ret "\"" + interner::get::<str>(*r.get_interner(), s) + "\"";
       }
       LIT_CHAR(c) {
         // FIXME: escape.
@@ -171,7 +171,7 @@ fn to_str(r: lexer::reader, t: token) -> str {
 
       /* Name components */
       IDENT(s, _) {
-        ret interner::get[str](*r.get_interner(), s);
+        ret interner::get::<str>(*r.get_interner(), s);
       }
       IDX(i) { ret "_" + int::to_str(i, 10u); }
       UNDERSCORE. { ret "_"; }
index 66a1062de7ef09601ddc05e239c5d6630d66f8ac..7bd89ed36d9e99d3580dd5e9d7c02f5e9b87fbe4 100644 (file)
@@ -55,9 +55,9 @@ fn ignore(node: &ann_node) { }
 fn rust_printer(writer: io::writer) -> ps {
     let boxes: [pp::breaks] = ~[];
     ret @{s: pp::mk_printer(writer, default_columns),
-          cm: none[codemap],
-          comments: none[[lexer::cmnt]],
-          literals: none[[lexer::lit]],
+          cm: none::<codemap>,
+          comments: none::<[lexer::cmnt]>,
+          literals: none::<[lexer::lit]>,
           mutable cur_cmnt: 0u,
           mutable cur_lit: 0u,
           mutable boxes: boxes,
@@ -231,7 +231,7 @@ fn commasep<IN>(s: &ps, b: breaks, elts: &[IN], op: fn(&ps, &IN) ) {
 fn commasep_cmnt<IN>(s: &ps, b: breaks, elts: &[IN], op: fn(&ps, &IN) ,
                      get_span: fn(&IN) -> codemap::span ) {
     box(s, 0u, b);
-    let len = vec::len[IN](elts);
+    let len = vec::len::<IN>(elts);
     let i = 0u;
     for elt: IN in elts {
         maybe_print_comment(s, get_span(elt).hi);
@@ -327,7 +327,7 @@ fn print_field(s: &ps, f: &ast::ty_field) {
           pclose(s);
       }
       ast::ty_fn(proto, inputs, output, cf, constrs) {
-        print_ty_fn(s, proto, none[str], inputs, output, cf, constrs);
+        print_ty_fn(s, proto, none::<str>, inputs, output, cf, constrs);
       }
       ast::ty_obj(methods) {
         head(s, "obj");
@@ -486,7 +486,7 @@ fn print_variant_arg(s: &ps, arg: &ast::variant_arg) {
                     pclose(s);
                 }
                 word(s.s, ";");
-                maybe_print_trailing_comment(s, v.span, none[uint]);
+                maybe_print_trailing_comment(s, v.span, none::<uint>);
             }
             bclose(s, item.span);
         }
@@ -575,7 +575,7 @@ fn print_stmt(s: &ps, st: &ast::stmt) {
       ast::stmt_expr(expr, _) { space_if_not_bol(s); print_expr(s, expr); }
     }
     if parse::parser::stmt_ends_with_semi(st) { word(s.s, ";"); }
-    maybe_print_trailing_comment(s, st.span, none[uint]);
+    maybe_print_trailing_comment(s, st.span, none::<uint>);
 }
 
 fn print_block(s: &ps, blk: &ast::blk) {
@@ -1436,9 +1436,9 @@ fn next_lit(s: &ps) -> option::t<lexer::lit> {
       some(lits) {
         if s.cur_lit < vec::len(lits) {
             ret some(lits.(s.cur_lit));
-        } else { ret none[lexer::lit]; }
+        } else { ret none::<lexer::lit>; }
       }
-      _ { ret none[lexer::lit]; }
+      _ { ret none::<lexer::lit>; }
     }
 }
 
@@ -1528,9 +1528,9 @@ fn next_comment(s: &ps) -> option::t<lexer::cmnt> {
       some(cmnts) {
         if s.cur_cmnt < vec::len(cmnts) {
             ret some(cmnts.(s.cur_cmnt));
-        } else { ret none[lexer::cmnt]; }
+        } else { ret none::<lexer::cmnt>; }
       }
-      _ { ret none[lexer::cmnt]; }
+      _ { ret none::<lexer::cmnt>; }
     }
 }
 
@@ -1542,7 +1542,7 @@ fn constr_args_to_str<T>(f: &fn(&T) -> str ,
     let s = "(";
     for a: @ast::sp_constr_arg<T> in args {
         if comma { s += ", "; } else { comma = true; }
-        s += constr_arg_to_str[T](f, a.node);
+        s += constr_arg_to_str::<T>(f, a.node);
     }
     s += ")";
     ret s;
@@ -1611,7 +1611,7 @@ fn proto_to_str(p: &ast::proto) -> str {
 
 fn ty_constr_to_str(c: &@ast::ty_constr) -> str {
     ret path_to_str(c.node.path) +
-            constr_args_to_str[ast::path](path_to_str, c.node.args);
+            constr_args_to_str::<ast::path>(path_to_str, c.node.args);
 }
 
 
index 8edfd3cb618661127665216f85744be1317c5516..0b80bdd5bfde7b02349fcacb327fb70aa2970cb3 100644 (file)
@@ -17,7 +17,7 @@
      eqer: eqfn<T>};
 
 fn mk<@T>(hasher: hashfn<T>, eqer: eqfn<T>) -> interner<T> {
-    let m = map::mk_hashmap[T, uint](hasher, eqer);
+    let m = map::mk_hashmap::<T, uint>(hasher, eqer);
     ret {map: m, mutable vect: ~[], hasher: hasher, eqer: eqer};
 }
 
@@ -25,7 +25,7 @@ fn intern<@T>(itr: &interner<T>, val: &T) -> uint {
     alt itr.map.find(val) {
       some(idx) { ret idx; }
       none. {
-        let new_idx = vec::len[T](itr.vect);
+        let new_idx = vec::len::<T>(itr.vect);
         itr.map.insert(val, new_idx);
         itr.vect += ~[val];
         ret new_idx;
index 2b91f7042853274614d38649bf9b026d5b7816bd..fd7a6b22661a0f6403e477e6be56294d54dd02f1 100644 (file)
           fn(&_fn, &[ty_param], &span, &fn_ident, node_id, &E, &vt<E>) };
 
 fn default_visitor<E>() -> visitor<E> {
-    ret @{visit_mod: bind visit_mod[E](_, _, _, _),
-          visit_view_item: bind visit_view_item[E](_, _, _),
-          visit_native_item: bind visit_native_item[E](_, _, _),
-          visit_item: bind visit_item[E](_, _, _),
-          visit_local: bind visit_local[E](_, _, _),
-          visit_block: bind visit_block[E](_, _, _),
-          visit_stmt: bind visit_stmt[E](_, _, _),
-          visit_arm: bind visit_arm[E](_, _, _),
-          visit_pat: bind visit_pat[E](_, _, _),
-          visit_decl: bind visit_decl[E](_, _, _),
-          visit_expr: bind visit_expr[E](_, _, _),
-          visit_ty: bind visit_ty[E](_, _, _),
-          visit_constr: bind visit_constr[E](_, _, _, _, _),
-          visit_fn: bind visit_fn[E](_, _, _, _, _, _, _)};
+    ret @{visit_mod: bind visit_mod::<E>(_, _, _, _),
+          visit_view_item: bind visit_view_item::<E>(_, _, _),
+          visit_native_item: bind visit_native_item::<E>(_, _, _),
+          visit_item: bind visit_item::<E>(_, _, _),
+          visit_local: bind visit_local::<E>(_, _, _),
+          visit_block: bind visit_block::<E>(_, _, _),
+          visit_stmt: bind visit_stmt::<E>(_, _, _),
+          visit_arm: bind visit_arm::<E>(_, _, _),
+          visit_pat: bind visit_pat::<E>(_, _, _),
+          visit_decl: bind visit_decl::<E>(_, _, _),
+          visit_expr: bind visit_expr::<E>(_, _, _),
+          visit_ty: bind visit_ty::<E>(_, _, _),
+          visit_constr: bind visit_constr::<E>(_, _, _, _, _),
+          visit_fn: bind visit_fn::<E>(_, _, _, _, _, _, _)};
 }
 
 fn visit_crate<E>(c: &crate, e: &E, v: &vt<E>) {
index cfc96844933ab79b8ae2c6556c1343615830f94e..984e047834bb9b68e90429d44887ef6d2b3c6172 100644 (file)
@@ -44,7 +44,7 @@ fn hash_def(d: &ast::def_id) -> uint {
 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);
+    ret std::map::mk_hashmap::<ast::def_id, V>(hasher, eqer);
 }
 
 fn field_expr(f: &ast::field) -> @ast::expr { ret f.node.expr; }
index a13c96fe4694d135b96cf1a49275540dd575f1be..37ba49b0a676113bb915b031b695b83c70958616 100644 (file)
@@ -61,7 +61,7 @@ fn fn_to_str(cx: &ctxt, proto: ast::proto, ident: option::t<ast::ident>,
         ret s;
     }
     fn method_to_str(cx: &ctxt, m: &method) -> str {
-        ret fn_to_str(cx, m.proto, some[ast::ident](m.ident), m.inputs,
+        ret fn_to_str(cx, m.proto, some::<ast::ident>(m.ident), m.inputs,
                       m.output, m.cf, m.constrs) + ";";
     }
     fn field_to_str(cx: &ctxt, f: &field) -> str {
@@ -109,7 +109,7 @@ fn mt_to_str(cx: &ctxt, m: &mt) -> str {
         // The user should never see this if the cname is set properly!
 
         s += "<tag#" + int::str(id.crate) + ":" + int::str(id.node) + ">";
-        if vec::len[t](tps) > 0u {
+        if vec::len::<t>(tps) > 0u {
             let strs: [str] = ~[];
             for typ: t in tps { strs += ~[ty_to_str(cx, typ)]; }
             s += "[" + str::connect(strs, ",") + "]";
@@ -165,7 +165,7 @@ fn constrs_str(constrs: &[@constr]) -> str {
 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);
+            constr_args_to_str::<ast::path>(path_to_str, c.node.args);
 }
 
 // Local Variables: