@@ -10,62 +10,6 @@ use rustc_hir as hir;
10
10
use rustc_hir:: def_id:: CrateNum ;
11
11
use rustc_hir:: HirId ;
12
12
13
- crate struct Module < ' hir > {
14
- crate name : Option < Symbol > ,
15
- crate attrs : & ' hir [ ast:: Attribute ] ,
16
- crate where_outer : Span ,
17
- crate where_inner : Span ,
18
- crate extern_crates : Vec < ExternCrate < ' hir > > ,
19
- crate imports : Vec < Import < ' hir > > ,
20
- crate structs : Vec < Struct < ' hir > > ,
21
- crate unions : Vec < Union < ' hir > > ,
22
- crate enums : Vec < Enum < ' hir > > ,
23
- crate fns : Vec < Function < ' hir > > ,
24
- crate mods : Vec < Module < ' hir > > ,
25
- crate id : hir:: HirId ,
26
- crate typedefs : Vec < Typedef < ' hir > > ,
27
- crate opaque_tys : Vec < OpaqueTy < ' hir > > ,
28
- crate statics : Vec < Static < ' hir > > ,
29
- crate constants : Vec < Constant < ' hir > > ,
30
- crate traits : Vec < Trait < ' hir > > ,
31
- crate impls : Vec < Impl < ' hir > > ,
32
- crate foreigns : Vec < ForeignItem < ' hir > > ,
33
- crate macros : Vec < Macro > ,
34
- crate proc_macros : Vec < ProcMacro > ,
35
- crate trait_aliases : Vec < TraitAlias < ' hir > > ,
36
- crate is_crate : bool ,
37
- }
38
-
39
- impl Module < ' hir > {
40
- crate fn new ( name : Option < Symbol > , attrs : & ' hir [ ast:: Attribute ] ) -> Module < ' hir > {
41
- Module {
42
- name,
43
- id : hir:: CRATE_HIR_ID ,
44
- where_outer : rustc_span:: DUMMY_SP ,
45
- where_inner : rustc_span:: DUMMY_SP ,
46
- attrs,
47
- extern_crates : Vec :: new ( ) ,
48
- imports : Vec :: new ( ) ,
49
- structs : Vec :: new ( ) ,
50
- unions : Vec :: new ( ) ,
51
- enums : Vec :: new ( ) ,
52
- fns : Vec :: new ( ) ,
53
- mods : Vec :: new ( ) ,
54
- typedefs : Vec :: new ( ) ,
55
- opaque_tys : Vec :: new ( ) ,
56
- statics : Vec :: new ( ) ,
57
- constants : Vec :: new ( ) ,
58
- traits : Vec :: new ( ) ,
59
- impls : Vec :: new ( ) ,
60
- foreigns : Vec :: new ( ) ,
61
- macros : Vec :: new ( ) ,
62
- proc_macros : Vec :: new ( ) ,
63
- trait_aliases : Vec :: new ( ) ,
64
- is_crate : false ,
65
- }
66
- }
67
- }
68
-
69
13
#[ derive( Debug , Clone , Copy ) ]
70
14
crate enum StructType {
71
15
/// A braced struct
@@ -186,15 +130,6 @@ crate struct ForeignItem<'hir> {
186
130
crate kind : & ' hir hir:: ForeignItemKind < ' hir > ,
187
131
}
188
132
189
- // For Macro we store the DefId instead of the NodeId, since we also create
190
- // these imported macro_rules (which only have a DUMMY_NODE_ID).
191
- crate struct Macro {
192
- crate name : Symbol ,
193
- crate def_id : hir:: def_id:: DefId ,
194
- crate matchers : Vec < Span > ,
195
- crate imported_from : Option < Symbol > ,
196
- }
197
-
198
133
crate struct ExternCrate < ' hir > {
199
134
crate name : Symbol ,
200
135
crate hir_id : HirId ,
0 commit comments