summary refs log tree commit diff
path: root/src/comp/syntax
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2011-10-25 15:56:55 +0200
committerMarijn Haverbeke <marijnh@gmail.com>2011-10-25 15:56:55 +0200
commitcfdf193c4671a11e40743748d9cded9603386346 (patch)
treedc7b1013eab9d6be0399816279d10b92f181abc2 /src/comp/syntax
parent58c82a8da2b16878766b5dc630f7499166cceb21 (diff)
downloadrust-cfdf193c4671a11e40743748d9cded9603386346.tar.gz
rust-cfdf193c4671a11e40743748d9cded9603386346.zip
Update our code to new type parameter kind syntax
Closes #1067
Diffstat (limited to 'src/comp/syntax')
-rw-r--r--src/comp/syntax/ast_util.rs4
-rw-r--r--src/comp/syntax/ext/simplext.rs2
-rw-r--r--src/comp/syntax/parse/parser.rs14
-rw-r--r--src/comp/syntax/util/interner.rs6
4 files changed, 13 insertions, 13 deletions
diff --git a/src/comp/syntax/ast_util.rs b/src/comp/syntax/ast_util.rs
index b10ce87a697..864b82ed9fb 100644
--- a/src/comp/syntax/ast_util.rs
+++ b/src/comp/syntax/ast_util.rs
@@ -2,7 +2,7 @@ import std::{str, option};
 import codemap::span;
 import ast::*;
 
-fn respan<@T>(sp: span, t: T) -> spanned<T> { ret {node: t, span: sp}; }
+fn respan<T>(sp: span, t: T) -> spanned<T> { ret {node: t, span: sp}; }
 
 /* assuming that we're not in macro expansion */
 fn mk_sp(lo: uint, hi: uint) -> span {
@@ -186,7 +186,7 @@ fn eq_def_id(&&a: def_id, &&b: def_id) -> bool {
     a == b
 }
 
-fn new_def_id_hash<@T>() -> std::map::hashmap<def_id, T> {
+fn new_def_id_hash<T>() -> std::map::hashmap<def_id, T> {
     std::map::mk_hashmap(hash_def_id, eq_def_id)
 }
 
diff --git a/src/comp/syntax/ext/simplext.rs b/src/comp/syntax/ext/simplext.rs
index d766ff11579..3adcfbccf4e 100644
--- a/src/comp/syntax/ext/simplext.rs
+++ b/src/comp/syntax/ext/simplext.rs
@@ -104,7 +104,7 @@ fn elts_to_ell(cx: ext_ctxt, elts: [@expr]) ->
         }
 }
 
-fn option_flatten_map<T, @U>(f: fn@(T) -> option::t<U>, v: [T]) ->
+fn option_flatten_map<T, U>(f: fn@(T) -> option::t<U>, v: [T]) ->
    option::t<[U]> {
     let res = [];
     for elem: T in v {
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index 7c9ad1fae1c..9b467e683b8 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -210,7 +210,7 @@ fn expect_gt(p: parser) {
     }
 }
 
-fn spanned<@T>(lo: uint, hi: uint, node: T) -> spanned<T> {
+fn spanned<T>(lo: uint, hi: uint, node: T) -> spanned<T> {
     ret {node: node, span: ast_util::mk_sp(lo, hi)};
 }
 
@@ -595,7 +595,7 @@ fn parse_fn_block_arg(p: parser) -> ast::arg {
     ret {mode: m, ty: t, ident: i, id: p.get_id()};
 }
 
-fn parse_seq_to_before_gt<@T>(sep: option::t<token::token>,
+fn parse_seq_to_before_gt<T>(sep: option::t<token::token>,
                               f: fn@(parser) -> T,
                               p: parser) -> [T] {
     let first = true;
@@ -612,7 +612,7 @@ fn parse_seq_to_before_gt<@T>(sep: option::t<token::token>,
     ret v;
 }
 
-fn parse_seq_to_gt<@T>(sep: option::t<token::token>, f: fn@(parser) -> T,
+fn parse_seq_to_gt<T>(sep: option::t<token::token>, f: fn@(parser) -> T,
                       p: parser) -> [T] {
     let v = parse_seq_to_before_gt(sep, f, p);
     expect_gt(p);
@@ -620,7 +620,7 @@ fn parse_seq_to_gt<@T>(sep: option::t<token::token>, f: fn@(parser) -> T,
     ret v;
 }
 
-fn parse_seq_lt_gt<@T>(sep: option::t<token::token>, f: fn@(parser) -> T,
+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);
@@ -630,14 +630,14 @@ fn parse_seq_lt_gt<@T>(sep: option::t<token::token>, f: fn@(parser) -> T,
     ret spanned(lo, hi, result);
 }
 
-fn parse_seq_to_end<@T>(ket: token::token, sep: option::t<token::token>,
+fn parse_seq_to_end<T>(ket: token::token, sep: option::t<token::token>,
                        f: fn(parser) -> T, p: parser) -> [T] {
     let val = parse_seq_to_before_end(ket, sep, f, p);
     p.bump();
     ret val;
 }
 
-fn parse_seq_to_before_end<@T>(ket: token::token,
+fn parse_seq_to_before_end<T>(ket: token::token,
                                sep: option::t<token::token>,
                                f: fn@(parser) -> T, p: parser) -> [T] {
     let first: bool = true;
@@ -653,7 +653,7 @@ fn parse_seq_to_before_end<@T>(ket: token::token,
 }
 
 
-fn parse_seq<@T>(bra: token::token, ket: token::token,
+fn parse_seq<T>(bra: token::token, ket: token::token,
                 sep: option::t<token::token>, f: fn@(parser) -> T, p: parser)
    -> spanned<[T]> {
     let lo = p.get_lo_pos();
diff --git a/src/comp/syntax/util/interner.rs b/src/comp/syntax/util/interner.rs
index 67324491267..dea86723af3 100644
--- a/src/comp/syntax/util/interner.rs
+++ b/src/comp/syntax/util/interner.rs
@@ -11,12 +11,12 @@ type interner<T> =
      hasher: hashfn<T>,
      eqer: eqfn<T>};
 
-fn mk<@T>(hasher: hashfn<T>, eqer: eqfn<T>) -> interner<T> {
+fn mk<T>(hasher: hashfn<T>, eqer: eqfn<T>) -> interner<T> {
     let m = map::mk_hashmap::<T, uint>(hasher, eqer);
     ret {map: m, mutable vect: [], hasher: hasher, eqer: eqer};
 }
 
-fn intern<@T>(itr: interner<T>, val: T) -> uint {
+fn intern<T>(itr: interner<T>, val: T) -> uint {
     alt itr.map.find(val) {
       some(idx) { ret idx; }
       none. {
@@ -31,7 +31,7 @@ fn intern<@T>(itr: interner<T>, val: T) -> uint {
 // |get| isn't "pure" in the traditional sense, because it can go from
 // failing to returning a value as items are interned. But for typestate,
 // where we first check a pred and then rely on it, ceasing to fail is ok.
-pure fn get<@T>(itr: interner<T>, idx: uint) -> T {
+pure fn get<T>(itr: interner<T>, idx: uint) -> T {
     unchecked {
         itr.vect[idx]
     }