mirror of
https://github.com/rust-lang/rust
synced 2024-09-15 22:50:55 +00:00
Switch to FnvHashMap
This commit is contained in:
parent
a6d9930525
commit
e78550bf88
|
@ -39,10 +39,10 @@
|
|||
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<HashMap<Rc<ty::TraitRef<'tcx>>,
|
||||
SelectionResult<'tcx, SelectionCandidate<'tcx>>>>,
|
||||
hashmap: RefCell<FnvHashMap<Rc<ty::TraitRef<'tcx>>,
|
||||
SelectionResult<'tcx, SelectionCandidate<'tcx>>>>,
|
||||
}
|
||||
|
||||
pub enum MethodMatchResult {
|
||||
|
@ -2634,7 +2634,7 @@ fn repr(&self, tcx: &ty::ctxt<'tcx>) -> String {
|
|||
impl<'tcx> SelectionCache<'tcx> {
|
||||
pub fn new() -> SelectionCache<'tcx> {
|
||||
SelectionCache {
|
||||
hashmap: RefCell::new(HashMap::new())
|
||||
hashmap: RefCell::new(FnvHashMap())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue