From e78550bf88eac19b5a1b7a5c1dbad0d0c331c557 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 18 Mar 2015 07:54:31 -0400 Subject: [PATCH] Switch to FnvHashMap --- src/librustc/middle/traits/select.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/librustc/middle/traits/select.rs b/src/librustc/middle/traits/select.rs index 740bed72d9b2..8004cc37ccfd 100644 --- a/src/librustc/middle/traits/select.rs +++ b/src/librustc/middle/traits/select.rs @@ -39,10 +39,10 @@ use middle::infer; use middle::infer::{InferCtxt, TypeFreshener}; use middle::ty_fold::TypeFoldable; use std::cell::RefCell; -use std::collections::hash_map::HashMap; use std::rc::Rc; use syntax::{abi, ast}; use util::common::ErrorReported; +use util::nodemap::FnvHashMap; use util::ppaux::Repr; pub struct SelectionContext<'cx, 'tcx:'cx> { @@ -86,8 +86,8 @@ struct TraitObligationStack<'prev, 'tcx: 'prev> { #[derive(Clone)] pub struct SelectionCache<'tcx> { - hashmap: RefCell>, - SelectionResult<'tcx, SelectionCandidate<'tcx>>>>, + hashmap: RefCell>, + SelectionResult<'tcx, SelectionCandidate<'tcx>>>>, } pub enum MethodMatchResult { @@ -2634,7 +2634,7 @@ impl<'tcx> Repr<'tcx> for SelectionCandidate<'tcx> { impl<'tcx> SelectionCache<'tcx> { pub fn new() -> SelectionCache<'tcx> { SelectionCache { - hashmap: RefCell::new(HashMap::new()) + hashmap: RefCell::new(FnvHashMap()) } } }