use middle::pat_util::pat_bindings;
use middle::subst::{ParamSpace, FnSpace, TypeSpace};
use middle::ty::{ExplicitSelfCategory, StaticExplicitSelfCategory};
-use middle::ty::{CaptureModeMap, Freevar, FreevarMap};
+use middle::ty::{CaptureModeMap, Freevar, FreevarMap, TraitMap};
use util::nodemap::{NodeMap, NodeSet, DefIdSet, FnvHashMap};
use syntax::ast::{Arm, BindByRef, BindByValue, BindingMode, Block, Crate, CrateNum};
// Map from the name in a pattern to its binding mode.
type BindingMap = HashMap<Name, BindingInfo>;
-// Trait method resolution
-pub type TraitMap = NodeMap<Vec<DefId>>;
-
// This is the replacement export map. It maps a module to all of the exports
// within.
pub type ExportMap = NodeMap<Vec<Export>>;
pub type CaptureModeMap = NodeMap<ast::CaptureClause>;
+// Trait method resolution
+pub type TraitMap = NodeMap<Vec<DefId>>;
+
pub fn with_freevars<T, F>(tcx: &ty::ctxt, fid: ast::NodeId, f: F) -> T where
F: FnOnce(&[Freevar]) -> T,
{
pub use rustc::util;
use middle::def;
-use middle::resolve;
use middle::infer;
use middle::subst;
use middle::subst::VecPerParamSpace;
struct CrateCtxt<'a, 'tcx: 'a> {
// A mapping from method call sites to traits that have that method.
- trait_map: resolve::TraitMap,
+ trait_map: ty::TraitMap,
tcx: &'a ty::ctxt<'tcx>
}
}
}
-pub fn check_crate(tcx: &ty::ctxt, trait_map: resolve::TraitMap) {
+pub fn check_crate(tcx: &ty::ctxt, trait_map: ty::TraitMap) {
let time_passes = tcx.sess.time_passes();
let ccx = CrateCtxt {
trait_map: trait_map,