diff --git a/src/librustc/middle/typeck/check/vtable.rs b/src/librustc/middle/typeck/check/vtable.rs index 4113d99a143e..2a705a8feb8b 100644 --- a/src/librustc/middle/typeck/check/vtable.rs +++ b/src/librustc/middle/typeck/check/vtable.rs @@ -28,7 +28,7 @@ use core::result::{Result, Ok, Err}; 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