Switch impls_seen from oldmap

This commit is contained in:
Seo Sanghyeon 2013-03-21 22:11:30 +09:00
parent f0beb8c059
commit e2b9cddbbb

View file

@ -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