about summary refs log tree commit diff
path: root/src/libsyntax/util/interner.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/util/interner.rs')
-rw-r--r--src/libsyntax/util/interner.rs15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/libsyntax/util/interner.rs b/src/libsyntax/util/interner.rs
index bd5c178e7fe..3cdc4fd0fa1 100644
--- a/src/libsyntax/util/interner.rs
+++ b/src/libsyntax/util/interner.rs
@@ -12,13 +12,8 @@
 // allows bidirectional lookup; i.e. given a value, one can easily find the
 // type, and vice versa.
 
-// allow the interner_key macro to escape this module:
-#[macro_escape];
-
-use core::prelude::*;
-
-use core::cmp::Equiv;
-use core::hashmap::HashMap;
+use std::cmp::Equiv;
+use std::hashmap::HashMap;
 
 pub struct Interner<T> {
     priv map: @mut HashMap<T, uint>,
@@ -26,7 +21,7 @@ pub struct Interner<T> {
 }
 
 // when traits can extend traits, we should extend index<uint,T> to get []
-impl<T:Eq + IterBytes + Hash + Const + Copy> Interner<T> {
+impl<T:Eq + IterBytes + Hash + Freeze + Copy> Interner<T> {
     pub fn new() -> Interner<T> {
         Interner {
             map: @mut HashMap::new(),
@@ -36,7 +31,7 @@ impl<T:Eq + IterBytes + Hash + Const + Copy> Interner<T> {
 
     pub fn prefill(init: &[T]) -> Interner<T> {
         let rv = Interner::new();
-        for init.each() |v| { rv.intern(copy *v); }
+        for init.iter().advance |v| { rv.intern(copy *v); }
         rv
     }
 
@@ -94,7 +89,7 @@ impl StrInterner {
 
     pub fn prefill(init: &[&str]) -> StrInterner {
         let rv = StrInterner::new();
-        for init.each |&v| { rv.intern(v); }
+        for init.iter().advance |&v| { rv.intern(v); }
         rv
     }