@@ -33,7 +33,7 @@ use ty::fold::TypeFolder;
33
33
use ty:: subst:: { Subst , Substs , VecPerParamSpace } ;
34
34
use ty:: walk:: TypeWalker ;
35
35
use util:: common:: MemoizationMap ;
36
- use util:: nodemap:: { NodeMap , NodeSet } ;
36
+ use util:: nodemap:: NodeSet ;
37
37
use util:: nodemap:: FnvHashMap ;
38
38
39
39
use serialize:: { Encodable , Encoder , Decodable , Decoder } ;
@@ -44,7 +44,6 @@ use std::iter;
44
44
use std:: rc:: Rc ;
45
45
use std:: slice;
46
46
use std:: vec:: IntoIter ;
47
- use std:: collections:: { HashMap , HashSet } ;
48
47
use syntax:: ast:: { self , CrateNum , Name , NodeId } ;
49
48
use syntax:: attr:: { self , AttrMetaMethods } ;
50
49
use syntax:: codemap:: { DUMMY_SP , Span } ;
@@ -115,7 +114,7 @@ pub struct CrateAnalysis<'a> {
115
114
pub access_levels : middle:: privacy:: AccessLevels ,
116
115
pub reachable : NodeSet ,
117
116
pub name : & ' a str ,
118
- pub glob_map : Option < GlobMap > ,
117
+ pub glob_map : Option < hir :: GlobMap > ,
119
118
}
120
119
121
120
#[ derive( Copy , Clone ) ]
@@ -2724,30 +2723,9 @@ pub enum ExplicitSelfCategory {
2724
2723
ByBox ,
2725
2724
}
2726
2725
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
-
2748
2726
impl < ' tcx > TyCtxt < ' tcx > {
2749
2727
pub fn with_freevars < T , F > ( & self , fid : NodeId , f : F ) -> T where
2750
- F : FnOnce ( & [ Freevar ] ) -> T ,
2728
+ F : FnOnce ( & [ hir :: Freevar ] ) -> T ,
2751
2729
{
2752
2730
match self . freevars . borrow ( ) . get ( & fid) {
2753
2731
None => f ( & [ ] ) ,
0 commit comments