]> git.lizzy.rs Git - rust.git/commitdiff
Switch impls_seen from oldmap
authorSeo Sanghyeon <sanxiyn@gmail.com>
Thu, 21 Mar 2013 13:11:30 +0000 (22:11 +0900)
committerSeo Sanghyeon <sanxiyn@gmail.com>
Thu, 21 Mar 2013 13:11:30 +0000 (22:11 +0900)
src/librustc/middle/typeck/check/vtable.rs

index 4113d99a143e32af1aea824a63e12d475fc67ae5..2a705a8feb8b8af855fee9d67f975c48ef3b810e 100644 (file)
@@ -28,7 +28,7 @@
 use core::result;
 use core::uint;
 use core::vec;
-use std::oldmap::HashMap;
+use core::hashmap::linear::LinearSet;
 use syntax::ast;
 use syntax::ast_util;
 use syntax::codemap::span;
@@ -234,7 +234,7 @@ pub fn lookup_vtable(vcx: &VtableContext,
         _ => {
             let mut found = ~[];
 
-            let mut impls_seen = HashMap();
+            let mut impls_seen = LinearSet::new();
 
             match vcx.ccx.coherence_info.extension_methods.find(&trait_id) {
                 None => {
@@ -250,10 +250,10 @@ pub fn lookup_vtable(vcx: &VtableContext,
                         // im is one specific impl of trait_ty.
 
                         // First, ensure we haven't processed this impl yet.
-                        if impls_seen.contains_key(&im.did) {
+                        if impls_seen.contains(&im.did) {
                             loop;
                         }
-                        impls_seen.insert(im.did, ());
+                        impls_seen.insert(im.did);
 
                         // ty::impl_traits gives us the list of all
                         // traits that im implements. Again, usually