use an FnvHashSet instead of an HashSet in fulfill
this doesn't cause a measurable perf increase, but it makes callgrind output cleaner. Anyway, rustc should be using FNV everywhere.
This commit is contained in:
parent
9b75a2bcd1
commit
96e6b2fef8
1 changed files with 3 additions and 4 deletions
|
|
@ -12,11 +12,10 @@ use middle::infer::InferCtxt;
|
|||
use middle::ty::{self, RegionEscape, Ty, HasTypeFlags};
|
||||
use middle::wf;
|
||||
|
||||
use std::collections::HashSet;
|
||||
use std::fmt;
|
||||
use syntax::ast;
|
||||
use util::common::ErrorReported;
|
||||
use util::nodemap::NodeMap;
|
||||
use util::nodemap::{FnvHashSet, NodeMap};
|
||||
|
||||
use super::CodeAmbiguity;
|
||||
use super::CodeProjectionError;
|
||||
|
|
@ -33,7 +32,7 @@ use super::Unimplemented;
|
|||
use super::util::predicate_for_builtin_bound;
|
||||
|
||||
pub struct FulfilledPredicates<'tcx> {
|
||||
set: HashSet<(RFC1214Warning, ty::Predicate<'tcx>)>
|
||||
set: FnvHashSet<(RFC1214Warning, ty::Predicate<'tcx>)>
|
||||
}
|
||||
|
||||
/// The fulfillment context is used to drive trait resolution. It
|
||||
|
|
@ -540,7 +539,7 @@ fn register_region_obligation<'tcx>(t_a: Ty<'tcx>,
|
|||
impl<'tcx> FulfilledPredicates<'tcx> {
|
||||
pub fn new() -> FulfilledPredicates<'tcx> {
|
||||
FulfilledPredicates {
|
||||
set: HashSet::new()
|
||||
set: FnvHashSet()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue