pub use self::AssocItemContainer::*;
pub use self::BorrowKind::*;
pub use self::IntVarValue::*;
-pub use self::fold::TypeFoldable;
+pub use self::fold::{TypeFoldable, TypeVisitor};
use crate::hir::{map as hir_map, GlobMap, TraitMap};
use crate::hir::Node;
use std::ops::Range;
use syntax::ast::{self, Name, Ident, NodeId};
use syntax::attr;
-use syntax_expand::hygiene::ExpnId;
-use syntax::symbol::{kw, sym, Symbol};
+use syntax_pos::symbol::{kw, sym, Symbol};
+use syntax_pos::hygiene::ExpnId;
use syntax_pos::Span;
use smallvec;
-use rustc_data_structures::fx::FxIndexMap;
+use rustc_data_structures::fx::{FxIndexMap};
use rustc_data_structures::stable_hasher::{StableHasher, HashStable};
use rustc_index::vec::{Idx, IndexVec};
pub use self::instance::{Instance, InstanceDef};
+pub use self::structural_match::search_for_structural_match_violation;
+pub use self::structural_match::type_marked_structural;
+pub use self::structural_match::NonStructuralMatchTy;
+
pub use self::trait_def::TraitDef;
pub use self::query::queries;
mod context;
mod instance;
mod structural_impls;
+mod structural_match;
mod sty;
// Data types
/// For each struct with outlive bounds, maps to a vector of the
/// predicate of its outlive bounds. If an item has no outlives
/// bounds, it will have no entry.
- pub predicates: FxHashMap<DefId, &'tcx [ty::Predicate<'tcx>]>,
+ pub predicates: FxHashMap<DefId, &'tcx [(ty::Predicate<'tcx>, Span)]>,
}
impl<'tcx> AsRef<Predicate<'tcx>> for Predicate<'tcx> {
}
}
+#[derive(Clone)]
pub struct AssocItemsIterator<'tcx> {
tcx: TyCtxt<'tcx>,
def_ids: &'tcx [DefId],
fn_like.asyncness()
}
-
pub fn provide(providers: &mut ty::query::Providers<'_>) {
context::provide(providers);
erase_regions::provide(providers);