summary refs log tree commit diff
path: root/src/libsyntax/util
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2012-08-02 15:42:56 -0700
committerNiko Matsakis <niko@alum.mit.edu>2012-08-02 15:53:28 -0700
commit97452c0ca16238a2de5503aca07db26ff9e8ba63 (patch)
tree47ef430d1671ab297bc192009aa74a23723a42fc /src/libsyntax/util
parent476ce459bd3b687658e566c75d0fb73281450d67 (diff)
downloadrust-97452c0ca16238a2de5503aca07db26ff9e8ba63.tar.gz
rust-97452c0ca16238a2de5503aca07db26ff9e8ba63.zip
Remove modes from map API and replace with regions.
API is (for now) mostly by value, there are options to use it by
reference if you like.  Hash and equality functions must be pure
and by reference (forward looking to the day when something
like send_map becomes the standard map).
Diffstat (limited to 'src/libsyntax/util')
-rw-r--r--src/libsyntax/util/interner.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/util/interner.rs b/src/libsyntax/util/interner.rs
index 5c2f78bce3b..5b959cb648a 100644
--- a/src/libsyntax/util/interner.rs
+++ b/src/libsyntax/util/interner.rs
@@ -11,8 +11,8 @@ type hash_interner<T: const> =
      hasher: hashfn<T>,
      eqer: eqfn<T>};
 
-fn mk<T: const copy>(hasher: hashfn<T>, eqer: eqfn<T>) -> interner<T> {
-    let m = map::hashmap::<T, uint>(hasher, eqer);
+fn mk<T: const copy>(+hasher: hashfn<T>, +eqer: eqfn<T>) -> interner<T> {
+    let m = map::hashmap::<T, uint>(copy hasher, copy eqer);
     let hi: hash_interner<T> =
         {map: m, vect: dvec(), hasher: hasher, eqer: eqer};
     return hi as interner::<T>;