MiniSet/MiniMap moved and renamed into SsoHashSet/SsoHashMap
It is a more descriptive name and with upcoming changes there will be nothing "mini" about them.
This commit is contained in:
parent
6f9a8a7f9b
commit
5c224a484d
10 changed files with 45 additions and 41 deletions
|
@ -101,8 +101,7 @@ pub mod vec_linked_list;
|
||||||
pub mod work_queue;
|
pub mod work_queue;
|
||||||
pub use atomic_ref::AtomicRef;
|
pub use atomic_ref::AtomicRef;
|
||||||
pub mod frozen;
|
pub mod frozen;
|
||||||
pub mod mini_map;
|
pub mod sso;
|
||||||
pub mod mini_set;
|
|
||||||
pub mod tagged_ptr;
|
pub mod tagged_ptr;
|
||||||
pub mod temp_dir;
|
pub mod temp_dir;
|
||||||
pub mod unhash;
|
pub mod unhash;
|
||||||
|
|
|
@ -8,21 +8,21 @@ use std::hash::Hash;
|
||||||
///
|
///
|
||||||
/// Stores elements in a small array up to a certain length
|
/// Stores elements in a small array up to a certain length
|
||||||
/// and switches to `HashMap` when that length is exceeded.
|
/// and switches to `HashMap` when that length is exceeded.
|
||||||
pub enum MiniMap<K, V> {
|
pub enum SsoHashMap<K, V> {
|
||||||
Array(ArrayVec<[(K, V); 8]>),
|
Array(ArrayVec<[(K, V); 8]>),
|
||||||
Map(FxHashMap<K, V>),
|
Map(FxHashMap<K, V>),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<K: Eq + Hash, V> MiniMap<K, V> {
|
impl<K: Eq + Hash, V> SsoHashMap<K, V> {
|
||||||
/// Creates an empty `MiniMap`.
|
/// Creates an empty `SsoHashMap`.
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
MiniMap::Array(ArrayVec::new())
|
SsoHashMap::Array(ArrayVec::new())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Inserts or updates value in the map.
|
/// Inserts or updates value in the map.
|
||||||
pub fn insert(&mut self, key: K, value: V) {
|
pub fn insert(&mut self, key: K, value: V) {
|
||||||
match self {
|
match self {
|
||||||
MiniMap::Array(array) => {
|
SsoHashMap::Array(array) => {
|
||||||
for pair in array.iter_mut() {
|
for pair in array.iter_mut() {
|
||||||
if pair.0 == key {
|
if pair.0 == key {
|
||||||
pair.1 = value;
|
pair.1 = value;
|
||||||
|
@ -33,10 +33,10 @@ impl<K: Eq + Hash, V> MiniMap<K, V> {
|
||||||
let mut map: FxHashMap<K, V> = array.drain(..).collect();
|
let mut map: FxHashMap<K, V> = array.drain(..).collect();
|
||||||
let (key, value) = error.element();
|
let (key, value) = error.element();
|
||||||
map.insert(key, value);
|
map.insert(key, value);
|
||||||
*self = MiniMap::Map(map);
|
*self = SsoHashMap::Map(map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MiniMap::Map(map) => {
|
SsoHashMap::Map(map) => {
|
||||||
map.insert(key, value);
|
map.insert(key, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ impl<K: Eq + Hash, V> MiniMap<K, V> {
|
||||||
/// Return value by key if any.
|
/// Return value by key if any.
|
||||||
pub fn get(&self, key: &K) -> Option<&V> {
|
pub fn get(&self, key: &K) -> Option<&V> {
|
||||||
match self {
|
match self {
|
||||||
MiniMap::Array(array) => {
|
SsoHashMap::Array(array) => {
|
||||||
for pair in array {
|
for pair in array {
|
||||||
if pair.0 == *key {
|
if pair.0 == *key {
|
||||||
return Some(&pair.1);
|
return Some(&pair.1);
|
||||||
|
@ -53,7 +53,7 @@ impl<K: Eq + Hash, V> MiniMap<K, V> {
|
||||||
}
|
}
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
MiniMap::Map(map) => {
|
SsoHashMap::Map(map) => {
|
||||||
return map.get(key);
|
return map.get(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
5
compiler/rustc_data_structures/src/sso/mod.rs
Normal file
5
compiler/rustc_data_structures/src/sso/mod.rs
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
mod map;
|
||||||
|
mod set;
|
||||||
|
|
||||||
|
pub use map::SsoHashMap;
|
||||||
|
pub use set::SsoHashSet;
|
|
@ -5,15 +5,15 @@ use std::hash::Hash;
|
||||||
///
|
///
|
||||||
/// Stores elements in a small array up to a certain length
|
/// Stores elements in a small array up to a certain length
|
||||||
/// and switches to `HashSet` when that length is exceeded.
|
/// and switches to `HashSet` when that length is exceeded.
|
||||||
pub enum MiniSet<T> {
|
pub enum SsoHashSet<T> {
|
||||||
Array(ArrayVec<[T; 8]>),
|
Array(ArrayVec<[T; 8]>),
|
||||||
Set(FxHashSet<T>),
|
Set(FxHashSet<T>),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: Eq + Hash> MiniSet<T> {
|
impl<T: Eq + Hash> SsoHashSet<T> {
|
||||||
/// Creates an empty `MiniSet`.
|
/// Creates an empty `SsoHashSet`.
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
MiniSet::Array(ArrayVec::new())
|
SsoHashSet::Array(ArrayVec::new())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Adds a value to the set.
|
/// Adds a value to the set.
|
||||||
|
@ -23,19 +23,19 @@ impl<T: Eq + Hash> MiniSet<T> {
|
||||||
/// If the set did have this value present, false is returned.
|
/// If the set did have this value present, false is returned.
|
||||||
pub fn insert(&mut self, elem: T) -> bool {
|
pub fn insert(&mut self, elem: T) -> bool {
|
||||||
match self {
|
match self {
|
||||||
MiniSet::Array(array) => {
|
SsoHashSet::Array(array) => {
|
||||||
if array.iter().any(|e| *e == elem) {
|
if array.iter().any(|e| *e == elem) {
|
||||||
false
|
false
|
||||||
} else {
|
} else {
|
||||||
if let Err(error) = array.try_push(elem) {
|
if let Err(error) = array.try_push(elem) {
|
||||||
let mut set: FxHashSet<T> = array.drain(..).collect();
|
let mut set: FxHashSet<T> = array.drain(..).collect();
|
||||||
set.insert(error.element());
|
set.insert(error.element());
|
||||||
*self = MiniSet::Set(set);
|
*self = SsoHashSet::Set(set);
|
||||||
}
|
}
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MiniSet::Set(set) => set.insert(elem),
|
SsoHashSet::Set(set) => set.insert(elem),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -35,7 +35,7 @@ use super::{InferCtxt, MiscVariable, TypeTrace};
|
||||||
use crate::traits::{Obligation, PredicateObligations};
|
use crate::traits::{Obligation, PredicateObligations};
|
||||||
|
|
||||||
use rustc_ast as ast;
|
use rustc_ast as ast;
|
||||||
use rustc_data_structures::mini_map::MiniMap;
|
use rustc_data_structures::sso::SsoHashMap;
|
||||||
use rustc_hir::def_id::DefId;
|
use rustc_hir::def_id::DefId;
|
||||||
use rustc_middle::traits::ObligationCause;
|
use rustc_middle::traits::ObligationCause;
|
||||||
use rustc_middle::ty::error::TypeError;
|
use rustc_middle::ty::error::TypeError;
|
||||||
|
@ -429,7 +429,7 @@ impl<'infcx, 'tcx> CombineFields<'infcx, 'tcx> {
|
||||||
needs_wf: false,
|
needs_wf: false,
|
||||||
root_ty: ty,
|
root_ty: ty,
|
||||||
param_env: self.param_env,
|
param_env: self.param_env,
|
||||||
cache: MiniMap::new(),
|
cache: SsoHashMap::new(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let ty = match generalize.relate(ty, ty) {
|
let ty = match generalize.relate(ty, ty) {
|
||||||
|
@ -490,7 +490,7 @@ struct Generalizer<'cx, 'tcx> {
|
||||||
|
|
||||||
param_env: ty::ParamEnv<'tcx>,
|
param_env: ty::ParamEnv<'tcx>,
|
||||||
|
|
||||||
cache: MiniMap<Ty<'tcx>, RelateResult<'tcx, Ty<'tcx>>>,
|
cache: SsoHashMap<Ty<'tcx>, RelateResult<'tcx, Ty<'tcx>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Result from a generalization operation. This includes
|
/// Result from a generalization operation. This includes
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::infer::outlives::env::RegionBoundPairs;
|
use crate::infer::outlives::env::RegionBoundPairs;
|
||||||
use crate::infer::{GenericKind, VerifyBound};
|
use crate::infer::{GenericKind, VerifyBound};
|
||||||
use rustc_data_structures::captures::Captures;
|
use rustc_data_structures::captures::Captures;
|
||||||
use rustc_data_structures::mini_set::MiniSet;
|
use rustc_data_structures::sso::SsoHashSet;
|
||||||
use rustc_hir::def_id::DefId;
|
use rustc_hir::def_id::DefId;
|
||||||
use rustc_middle::ty::subst::{GenericArg, GenericArgKind, Subst};
|
use rustc_middle::ty::subst::{GenericArg, GenericArgKind, Subst};
|
||||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||||
|
@ -32,7 +32,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
|
||||||
/// Returns a "verify bound" that encodes what we know about
|
/// Returns a "verify bound" that encodes what we know about
|
||||||
/// `generic` and the regions it outlives.
|
/// `generic` and the regions it outlives.
|
||||||
pub fn generic_bound(&self, generic: GenericKind<'tcx>) -> VerifyBound<'tcx> {
|
pub fn generic_bound(&self, generic: GenericKind<'tcx>) -> VerifyBound<'tcx> {
|
||||||
let mut visited = MiniSet::new();
|
let mut visited = SsoHashSet::new();
|
||||||
match generic {
|
match generic {
|
||||||
GenericKind::Param(param_ty) => self.param_bound(param_ty),
|
GenericKind::Param(param_ty) => self.param_bound(param_ty),
|
||||||
GenericKind::Projection(projection_ty) => {
|
GenericKind::Projection(projection_ty) => {
|
||||||
|
@ -44,7 +44,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
|
||||||
fn type_bound(
|
fn type_bound(
|
||||||
&self,
|
&self,
|
||||||
ty: Ty<'tcx>,
|
ty: Ty<'tcx>,
|
||||||
visited: &mut MiniSet<GenericArg<'tcx>>,
|
visited: &mut SsoHashSet<GenericArg<'tcx>>,
|
||||||
) -> VerifyBound<'tcx> {
|
) -> VerifyBound<'tcx> {
|
||||||
match *ty.kind() {
|
match *ty.kind() {
|
||||||
ty::Param(p) => self.param_bound(p),
|
ty::Param(p) => self.param_bound(p),
|
||||||
|
@ -148,7 +148,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
|
||||||
pub fn projection_bound(
|
pub fn projection_bound(
|
||||||
&self,
|
&self,
|
||||||
projection_ty: ty::ProjectionTy<'tcx>,
|
projection_ty: ty::ProjectionTy<'tcx>,
|
||||||
visited: &mut MiniSet<GenericArg<'tcx>>,
|
visited: &mut SsoHashSet<GenericArg<'tcx>>,
|
||||||
) -> VerifyBound<'tcx> {
|
) -> VerifyBound<'tcx> {
|
||||||
debug!("projection_bound(projection_ty={:?})", projection_ty);
|
debug!("projection_bound(projection_ty={:?})", projection_ty);
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
|
||||||
fn recursive_bound(
|
fn recursive_bound(
|
||||||
&self,
|
&self,
|
||||||
parent: GenericArg<'tcx>,
|
parent: GenericArg<'tcx>,
|
||||||
visited: &mut MiniSet<GenericArg<'tcx>>,
|
visited: &mut SsoHashSet<GenericArg<'tcx>>,
|
||||||
) -> VerifyBound<'tcx> {
|
) -> VerifyBound<'tcx> {
|
||||||
let mut bounds = parent
|
let mut bounds = parent
|
||||||
.walk_shallow(visited)
|
.walk_shallow(visited)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
use crate::ty::subst::{GenericArg, GenericArgKind};
|
use crate::ty::subst::{GenericArg, GenericArgKind};
|
||||||
use crate::ty::{self, Ty, TyCtxt, TypeFoldable};
|
use crate::ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||||
use rustc_data_structures::mini_set::MiniSet;
|
use rustc_data_structures::sso::SsoHashSet;
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
@ -51,7 +51,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
||||||
/// Push onto `out` all the things that must outlive `'a` for the condition
|
/// Push onto `out` all the things that must outlive `'a` for the condition
|
||||||
/// `ty0: 'a` to hold. Note that `ty0` must be a **fully resolved type**.
|
/// `ty0: 'a` to hold. Note that `ty0` must be a **fully resolved type**.
|
||||||
pub fn push_outlives_components(self, ty0: Ty<'tcx>, out: &mut SmallVec<[Component<'tcx>; 4]>) {
|
pub fn push_outlives_components(self, ty0: Ty<'tcx>, out: &mut SmallVec<[Component<'tcx>; 4]>) {
|
||||||
let mut visited = MiniSet::new();
|
let mut visited = SsoHashSet::new();
|
||||||
compute_components(self, ty0, out, &mut visited);
|
compute_components(self, ty0, out, &mut visited);
|
||||||
debug!("components({:?}) = {:?}", ty0, out);
|
debug!("components({:?}) = {:?}", ty0, out);
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ fn compute_components(
|
||||||
tcx: TyCtxt<'tcx>,
|
tcx: TyCtxt<'tcx>,
|
||||||
ty: Ty<'tcx>,
|
ty: Ty<'tcx>,
|
||||||
out: &mut SmallVec<[Component<'tcx>; 4]>,
|
out: &mut SmallVec<[Component<'tcx>; 4]>,
|
||||||
visited: &mut MiniSet<GenericArg<'tcx>>,
|
visited: &mut SsoHashSet<GenericArg<'tcx>>,
|
||||||
) {
|
) {
|
||||||
// Descend through the types, looking for the various "base"
|
// Descend through the types, looking for the various "base"
|
||||||
// components and collecting them into `out`. This is not written
|
// components and collecting them into `out`. This is not written
|
||||||
|
@ -142,7 +142,7 @@ fn compute_components(
|
||||||
// OutlivesProjectionComponents. Continue walking
|
// OutlivesProjectionComponents. Continue walking
|
||||||
// through and constrain Pi.
|
// through and constrain Pi.
|
||||||
let mut subcomponents = smallvec![];
|
let mut subcomponents = smallvec![];
|
||||||
let mut subvisited = MiniSet::new();
|
let mut subvisited = SsoHashSet::new();
|
||||||
compute_components_recursive(tcx, ty.into(), &mut subcomponents, &mut subvisited);
|
compute_components_recursive(tcx, ty.into(), &mut subcomponents, &mut subvisited);
|
||||||
out.push(Component::EscapingProjection(subcomponents.into_iter().collect()));
|
out.push(Component::EscapingProjection(subcomponents.into_iter().collect()));
|
||||||
}
|
}
|
||||||
|
@ -194,7 +194,7 @@ fn compute_components_recursive(
|
||||||
tcx: TyCtxt<'tcx>,
|
tcx: TyCtxt<'tcx>,
|
||||||
parent: GenericArg<'tcx>,
|
parent: GenericArg<'tcx>,
|
||||||
out: &mut SmallVec<[Component<'tcx>; 4]>,
|
out: &mut SmallVec<[Component<'tcx>; 4]>,
|
||||||
visited: &mut MiniSet<GenericArg<'tcx>>,
|
visited: &mut SsoHashSet<GenericArg<'tcx>>,
|
||||||
) {
|
) {
|
||||||
for child in parent.walk_shallow(visited) {
|
for child in parent.walk_shallow(visited) {
|
||||||
match child.unpack() {
|
match child.unpack() {
|
||||||
|
|
|
@ -2,7 +2,7 @@ use crate::ty::subst::{GenericArg, Subst};
|
||||||
use crate::ty::{self, DefIdTree, Ty, TyCtxt};
|
use crate::ty::{self, DefIdTree, Ty, TyCtxt};
|
||||||
|
|
||||||
use rustc_data_structures::fx::FxHashSet;
|
use rustc_data_structures::fx::FxHashSet;
|
||||||
use rustc_data_structures::mini_set::MiniSet;
|
use rustc_data_structures::sso::SsoHashSet;
|
||||||
use rustc_hir::def_id::{CrateNum, DefId};
|
use rustc_hir::def_id::{CrateNum, DefId};
|
||||||
use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData};
|
use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData};
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ pub trait Printer<'tcx>: Sized {
|
||||||
/// deeply nested tuples that have no DefId.
|
/// deeply nested tuples that have no DefId.
|
||||||
fn characteristic_def_id_of_type_cached<'a>(
|
fn characteristic_def_id_of_type_cached<'a>(
|
||||||
ty: Ty<'a>,
|
ty: Ty<'a>,
|
||||||
visited: &mut MiniSet<Ty<'a>>,
|
visited: &mut SsoHashSet<Ty<'a>>,
|
||||||
) -> Option<DefId> {
|
) -> Option<DefId> {
|
||||||
match *ty.kind() {
|
match *ty.kind() {
|
||||||
ty::Adt(adt_def, _) => Some(adt_def.did),
|
ty::Adt(adt_def, _) => Some(adt_def.did),
|
||||||
|
@ -316,7 +316,7 @@ fn characteristic_def_id_of_type_cached<'a>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub fn characteristic_def_id_of_type(ty: Ty<'_>) -> Option<DefId> {
|
pub fn characteristic_def_id_of_type(ty: Ty<'_>) -> Option<DefId> {
|
||||||
characteristic_def_id_of_type_cached(ty, &mut MiniSet::new())
|
characteristic_def_id_of_type_cached(ty, &mut SsoHashSet::new())
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'tcx, P: Printer<'tcx>> Print<'tcx, P> for ty::RegionKind {
|
impl<'tcx, P: Printer<'tcx>> Print<'tcx, P> for ty::RegionKind {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
use crate::ty;
|
use crate::ty;
|
||||||
use crate::ty::subst::{GenericArg, GenericArgKind};
|
use crate::ty::subst::{GenericArg, GenericArgKind};
|
||||||
use rustc_data_structures::mini_set::MiniSet;
|
use rustc_data_structures::sso::SsoHashSet;
|
||||||
use smallvec::{self, SmallVec};
|
use smallvec::{self, SmallVec};
|
||||||
|
|
||||||
// The TypeWalker's stack is hot enough that it's worth going to some effort to
|
// The TypeWalker's stack is hot enough that it's worth going to some effort to
|
||||||
|
@ -13,7 +13,7 @@ type TypeWalkerStack<'tcx> = SmallVec<[GenericArg<'tcx>; 8]>;
|
||||||
pub struct TypeWalker<'tcx> {
|
pub struct TypeWalker<'tcx> {
|
||||||
stack: TypeWalkerStack<'tcx>,
|
stack: TypeWalkerStack<'tcx>,
|
||||||
last_subtree: usize,
|
last_subtree: usize,
|
||||||
visited: MiniSet<GenericArg<'tcx>>,
|
visited: SsoHashSet<GenericArg<'tcx>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An iterator for walking the type tree.
|
/// An iterator for walking the type tree.
|
||||||
|
@ -26,7 +26,7 @@ pub struct TypeWalker<'tcx> {
|
||||||
/// skips any types that are already there.
|
/// skips any types that are already there.
|
||||||
impl<'tcx> TypeWalker<'tcx> {
|
impl<'tcx> TypeWalker<'tcx> {
|
||||||
pub fn new(root: GenericArg<'tcx>) -> Self {
|
pub fn new(root: GenericArg<'tcx>) -> Self {
|
||||||
Self { stack: smallvec![root], last_subtree: 1, visited: MiniSet::new() }
|
Self { stack: smallvec![root], last_subtree: 1, visited: SsoHashSet::new() }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Skips the subtree corresponding to the last type
|
/// Skips the subtree corresponding to the last type
|
||||||
|
@ -87,7 +87,7 @@ impl GenericArg<'tcx> {
|
||||||
/// and skips any types that are already there.
|
/// and skips any types that are already there.
|
||||||
pub fn walk_shallow(
|
pub fn walk_shallow(
|
||||||
self,
|
self,
|
||||||
visited: &mut MiniSet<GenericArg<'tcx>>,
|
visited: &mut SsoHashSet<GenericArg<'tcx>>,
|
||||||
) -> impl Iterator<Item = GenericArg<'tcx>> {
|
) -> impl Iterator<Item = GenericArg<'tcx>> {
|
||||||
let mut stack = SmallVec::new();
|
let mut stack = SmallVec::new();
|
||||||
push_inner(&mut stack, self);
|
push_inner(&mut stack, self);
|
||||||
|
|
|
@ -7,7 +7,7 @@ use crate::infer::canonical::OriginalQueryValues;
|
||||||
use crate::infer::{InferCtxt, InferOk};
|
use crate::infer::{InferCtxt, InferOk};
|
||||||
use crate::traits::error_reporting::InferCtxtExt;
|
use crate::traits::error_reporting::InferCtxtExt;
|
||||||
use crate::traits::{Obligation, ObligationCause, PredicateObligation, Reveal};
|
use crate::traits::{Obligation, ObligationCause, PredicateObligation, Reveal};
|
||||||
use rustc_data_structures::mini_map::MiniMap;
|
use rustc_data_structures::sso::SsoHashMap;
|
||||||
use rustc_data_structures::stack::ensure_sufficient_stack;
|
use rustc_data_structures::stack::ensure_sufficient_stack;
|
||||||
use rustc_infer::traits::Normalized;
|
use rustc_infer::traits::Normalized;
|
||||||
use rustc_middle::ty::fold::{TypeFoldable, TypeFolder};
|
use rustc_middle::ty::fold::{TypeFoldable, TypeFolder};
|
||||||
|
@ -58,7 +58,7 @@ impl<'cx, 'tcx> AtExt<'tcx> for At<'cx, 'tcx> {
|
||||||
param_env: self.param_env,
|
param_env: self.param_env,
|
||||||
obligations: vec![],
|
obligations: vec![],
|
||||||
error: false,
|
error: false,
|
||||||
cache: MiniMap::new(),
|
cache: SsoHashMap::new(),
|
||||||
anon_depth: 0,
|
anon_depth: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ struct QueryNormalizer<'cx, 'tcx> {
|
||||||
cause: &'cx ObligationCause<'tcx>,
|
cause: &'cx ObligationCause<'tcx>,
|
||||||
param_env: ty::ParamEnv<'tcx>,
|
param_env: ty::ParamEnv<'tcx>,
|
||||||
obligations: Vec<PredicateObligation<'tcx>>,
|
obligations: Vec<PredicateObligation<'tcx>>,
|
||||||
cache: MiniMap<Ty<'tcx>, Ty<'tcx>>,
|
cache: SsoHashMap<Ty<'tcx>, Ty<'tcx>>,
|
||||||
error: bool,
|
error: bool,
|
||||||
anon_depth: usize,
|
anon_depth: usize,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue