summary refs log tree commit diff
path: root/src/comp/syntax/util
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2012-01-05 15:35:37 +0100
committerMarijn Haverbeke <marijnh@gmail.com>2012-01-05 15:50:02 +0100
commit60ae1590af034755b5cb1e1e71f2240a710299a2 (patch)
tree605d11f071a776c0ca33dcfea0a774379b0880bb /src/comp/syntax/util
parent1f71a0f48d18d80ff3be6970d582c5a67f976329 (diff)
downloadrust-60ae1590af034755b5cb1e1e71f2240a710299a2.tar.gz
rust-60ae1590af034755b5cb1e1e71f2240a710299a2.zip
Switch to new param kind bound syntax
And remove support for the old syntax
Diffstat (limited to 'src/comp/syntax/util')
-rw-r--r--src/comp/syntax/util/interner.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/comp/syntax/util/interner.rs b/src/comp/syntax/util/interner.rs
index 2c1589085f2..ab411baaf5a 100644
--- a/src/comp/syntax/util/interner.rs
+++ b/src/comp/syntax/util/interner.rs
@@ -12,12 +12,12 @@ type interner<T> =
      hasher: hashfn<T>,
      eqer: eqfn<T>};
 
-fn mk<copy T>(hasher: hashfn<T>, eqer: eqfn<T>) -> interner<T> {
+fn mk<T: copy>(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<copy T>(itr: interner<T>, val: T) -> uint {
+fn intern<T: copy>(itr: interner<T>, val: T) -> uint {
     alt itr.map.find(val) {
       some(idx) { ret idx; }
       none. {
@@ -32,7 +32,7 @@ fn intern<copy 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<copy T>(itr: interner<T>, idx: uint) -> T {
+pure fn get<T: copy>(itr: interner<T>, idx: uint) -> T {
     unchecked {
         itr.vect[idx]
     }