@@ -33,7 +33,7 @@ use ty::fold::TypeFolder;
3333use ty:: subst:: { Subst , Substs , VecPerParamSpace } ;
3434use ty:: walk:: TypeWalker ;
3535use util:: common:: MemoizationMap ;
36- use util:: nodemap:: { NodeMap , NodeSet } ;
36+ use util:: nodemap:: NodeSet ;
3737use util:: nodemap:: FnvHashMap ;
3838
3939use serialize:: { Encodable , Encoder , Decodable , Decoder } ;
@@ -44,7 +44,6 @@ use std::iter;
4444use std:: rc:: Rc ;
4545use std:: slice;
4646use std:: vec:: IntoIter ;
47- use std:: collections:: { HashMap , HashSet } ;
4847use syntax:: ast:: { self , CrateNum , Name , NodeId } ;
4948use syntax:: attr:: { self , AttrMetaMethods } ;
5049use syntax:: codemap:: { DUMMY_SP , Span } ;
@@ -115,7 +114,7 @@ pub struct CrateAnalysis<'a> {
115114 pub access_levels : middle:: privacy:: AccessLevels ,
116115 pub reachable : NodeSet ,
117116 pub name : & ' a str ,
118- pub glob_map : Option < GlobMap > ,
117+ pub glob_map : Option < hir :: GlobMap > ,
119118}
120119
121120#[ derive( Copy , Clone ) ]
@@ -2724,30 +2723,9 @@ pub enum ExplicitSelfCategory {
27242723 ByBox ,
27252724}
27262725
2727- /// A free variable referred to in a function.
2728- #[ derive( Copy , Clone , RustcEncodable , RustcDecodable ) ]
2729- pub struct Freevar {
2730- /// The variable being accessed free.
2731- pub def : Def ,
2732-
2733- // First span where it is accessed (there can be multiple).
2734- pub span : Span
2735- }
2736-
2737- pub type FreevarMap = NodeMap < Vec < Freevar > > ;
2738-
2739- pub type CaptureModeMap = NodeMap < hir:: CaptureClause > ;
2740-
2741- // Trait method resolution
2742- pub type TraitMap = NodeMap < Vec < DefId > > ;
2743-
2744- // Map from the NodeId of a glob import to a list of items which are actually
2745- // imported.
2746- pub type GlobMap = HashMap < NodeId , HashSet < Name > > ;
2747-
27482726impl < ' tcx > TyCtxt < ' tcx > {
27492727 pub fn with_freevars < T , F > ( & self , fid : NodeId , f : F ) -> T where
2750- F : FnOnce ( & [ Freevar ] ) -> T ,
2728+ F : FnOnce ( & [ hir :: Freevar ] ) -> T ,
27512729 {
27522730 match self . freevars . borrow ( ) . get ( & fid) {
27532731 None => f ( & [ ] ) ,
0 commit comments