@@ -54,7 +54,7 @@ use rustc::hir::intravisit::Visitor;
54
54
use rustc:: hir:: intravisit;
55
55
use rustc:: hir:: map:: DefKey ;
56
56
57
- use super :: index_builder:: { CrateIndex , XRef } ;
57
+ use super :: index_builder:: { IndexBuilder , XRef } ;
58
58
59
59
pub struct EncodeContext < ' a , ' tcx : ' a > {
60
60
pub diag : & ' a Handler ,
@@ -134,7 +134,7 @@ fn encode_item_variances(rbml_w: &mut Encoder,
134
134
135
135
fn encode_bounds_and_type_for_item < ' a , ' tcx > ( rbml_w : & mut Encoder ,
136
136
ecx : & EncodeContext < ' a , ' tcx > ,
137
- index : & mut CrateIndex < ' a , ' tcx > ,
137
+ index : & mut IndexBuilder < ' a , ' tcx > ,
138
138
id : NodeId ) {
139
139
encode_bounds_and_type ( rbml_w,
140
140
ecx,
@@ -145,7 +145,7 @@ fn encode_bounds_and_type_for_item<'a, 'tcx>(rbml_w: &mut Encoder,
145
145
146
146
fn encode_bounds_and_type < ' a , ' tcx > ( rbml_w : & mut Encoder ,
147
147
ecx : & EncodeContext < ' a , ' tcx > ,
148
- index : & mut CrateIndex < ' a , ' tcx > ,
148
+ index : & mut IndexBuilder < ' a , ' tcx > ,
149
149
scheme : & ty:: TypeScheme < ' tcx > ,
150
150
predicates : & ty:: GenericPredicates < ' tcx > ) {
151
151
encode_generics ( rbml_w, ecx, index, & scheme. generics , & predicates) ;
@@ -204,7 +204,7 @@ fn encode_enum_variant_info<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
204
204
rbml_w : & mut Encoder ,
205
205
did : DefId ,
206
206
vis : & hir:: Visibility ,
207
- index : & mut CrateIndex < ' a , ' tcx > ) {
207
+ index : & mut IndexBuilder < ' a , ' tcx > ) {
208
208
debug ! ( "encode_enum_variant_info(did={:?})" , did) ;
209
209
let repr_hints = ecx. tcx . lookup_repr_hints ( did) ;
210
210
let repr_type = ecx. tcx . enum_repr_type ( repr_hints. get ( 0 ) ) ;
@@ -424,7 +424,7 @@ fn encode_item_sort(rbml_w: &mut Encoder, sort: char) {
424
424
fn encode_field < ' a , ' tcx > ( ecx : & EncodeContext < ' a , ' tcx > ,
425
425
rbml_w : & mut Encoder ,
426
426
field : ty:: FieldDef < ' tcx > ,
427
- index : & mut CrateIndex < ' a , ' tcx > ) {
427
+ index : & mut IndexBuilder < ' a , ' tcx > ) {
428
428
let nm = field. name ;
429
429
let id = ecx. local_id ( field. did ) ;
430
430
@@ -448,7 +448,7 @@ fn encode_info_for_struct_ctor<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
448
448
rbml_w : & mut Encoder ,
449
449
name : Name ,
450
450
struct_def : & hir:: VariantData ,
451
- index : & mut CrateIndex < ' a , ' tcx > ,
451
+ index : & mut IndexBuilder < ' a , ' tcx > ,
452
452
struct_id : NodeId ) {
453
453
let ctor_id = struct_def. id ( ) ;
454
454
let ctor_def_id = ecx. tcx . map . local_def_id ( ctor_id) ;
@@ -480,7 +480,7 @@ fn encode_info_for_struct_ctor<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
480
480
481
481
fn encode_generics < ' a , ' tcx > ( rbml_w : & mut Encoder ,
482
482
ecx : & EncodeContext < ' a , ' tcx > ,
483
- index : & mut CrateIndex < ' a , ' tcx > ,
483
+ index : & mut IndexBuilder < ' a , ' tcx > ,
484
484
generics : & ty:: Generics < ' tcx > ,
485
485
predicates : & ty:: GenericPredicates < ' tcx > )
486
486
{
@@ -493,7 +493,7 @@ fn encode_generics<'a, 'tcx>(rbml_w: &mut Encoder,
493
493
}
494
494
495
495
fn encode_predicates < ' a , ' tcx > ( rbml_w : & mut Encoder ,
496
- index : & mut CrateIndex < ' a , ' tcx > ,
496
+ index : & mut IndexBuilder < ' a , ' tcx > ,
497
497
predicates : & ty:: GenericPredicates < ' tcx > ,
498
498
tag : usize )
499
499
{
@@ -510,7 +510,7 @@ fn encode_predicates<'a,'tcx>(rbml_w: &mut Encoder,
510
510
511
511
fn encode_method_ty_fields < ' a , ' tcx > ( ecx : & EncodeContext < ' a , ' tcx > ,
512
512
rbml_w : & mut Encoder ,
513
- index : & mut CrateIndex < ' a , ' tcx > ,
513
+ index : & mut IndexBuilder < ' a , ' tcx > ,
514
514
method_ty : & ty:: Method < ' tcx > ) {
515
515
encode_def_id_and_key ( ecx, rbml_w, method_ty. def_id ) ;
516
516
encode_name ( rbml_w, method_ty. name ) ;
@@ -528,7 +528,7 @@ fn encode_method_ty_fields<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
528
528
529
529
fn encode_info_for_associated_const < ' a , ' tcx > ( ecx : & EncodeContext < ' a , ' tcx > ,
530
530
rbml_w : & mut Encoder ,
531
- index : & mut CrateIndex < ' a , ' tcx > ,
531
+ index : & mut IndexBuilder < ' a , ' tcx > ,
532
532
associated_const : & ty:: AssociatedConst ,
533
533
parent_id : NodeId ,
534
534
impl_item_opt : Option < & hir:: ImplItem > ) {
@@ -570,7 +570,7 @@ fn encode_info_for_associated_const<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
570
570
571
571
fn encode_info_for_method < ' a , ' tcx > ( ecx : & EncodeContext < ' a , ' tcx > ,
572
572
rbml_w : & mut Encoder ,
573
- index : & mut CrateIndex < ' a , ' tcx > ,
573
+ index : & mut IndexBuilder < ' a , ' tcx > ,
574
574
m : & ty:: Method < ' tcx > ,
575
575
is_default_impl : bool ,
576
576
parent_id : NodeId ,
@@ -618,7 +618,7 @@ fn encode_info_for_method<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
618
618
619
619
fn encode_info_for_associated_type < ' a , ' tcx > ( ecx : & EncodeContext < ' a , ' tcx > ,
620
620
rbml_w : & mut Encoder ,
621
- index : & mut CrateIndex < ' a , ' tcx > ,
621
+ index : & mut IndexBuilder < ' a , ' tcx > ,
622
622
associated_type : & ty:: AssociatedType < ' tcx > ,
623
623
parent_id : NodeId ,
624
624
impl_item_opt : Option < & hir:: ImplItem > ) {
@@ -765,7 +765,7 @@ fn encode_xrefs<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
765
765
fn encode_info_for_item < ' a , ' tcx > ( ecx : & EncodeContext < ' a , ' tcx > ,
766
766
rbml_w : & mut Encoder ,
767
767
item : & hir:: Item ,
768
- index : & mut CrateIndex < ' a , ' tcx > ) {
768
+ index : & mut IndexBuilder < ' a , ' tcx > ) {
769
769
let tcx = ecx. tcx ;
770
770
771
771
debug ! ( "encoding info for item at {}" ,
@@ -1237,7 +1237,7 @@ fn encode_info_for_item<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
1237
1237
fn encode_info_for_foreign_item < ' a , ' tcx > ( ecx : & EncodeContext < ' a , ' tcx > ,
1238
1238
rbml_w : & mut Encoder ,
1239
1239
nitem : & hir:: ForeignItem ,
1240
- index : & mut CrateIndex < ' a , ' tcx > ) {
1240
+ index : & mut IndexBuilder < ' a , ' tcx > ) {
1241
1241
debug ! ( "writing foreign item {}" , ecx. tcx. node_path_str( nitem. id) ) ;
1242
1242
let def_id = ecx. tcx . map . local_def_id ( nitem. id ) ;
1243
1243
let abi = ecx. tcx . map . get_foreign_abi ( nitem. id ) ;
@@ -1285,7 +1285,7 @@ fn encode_info_for_foreign_item<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
1285
1285
fn my_visit_expr ( expr : & hir:: Expr ,
1286
1286
rbml_w : & mut Encoder ,
1287
1287
ecx : & EncodeContext ,
1288
- index : & mut CrateIndex ) {
1288
+ index : & mut IndexBuilder ) {
1289
1289
match expr. node {
1290
1290
hir:: ExprClosure ( ..) => {
1291
1291
let def_id = ecx. tcx . map . local_def_id ( expr. id ) ;
@@ -1316,7 +1316,7 @@ fn my_visit_expr(expr: &hir::Expr,
1316
1316
struct EncodeVisitor < ' a , ' b : ' a , ' c : ' a , ' tcx : ' c > {
1317
1317
rbml_w_for_visit_item : & ' a mut Encoder < ' b > ,
1318
1318
ecx : & ' a EncodeContext < ' c , ' tcx > ,
1319
- index : & ' a mut CrateIndex < ' c , ' tcx > ,
1319
+ index : & ' a mut IndexBuilder < ' c , ' tcx > ,
1320
1320
}
1321
1321
1322
1322
impl < ' a , ' b , ' c , ' tcx > Visitor < ' tcx > for EncodeVisitor < ' a , ' b , ' c , ' tcx > {
@@ -1350,10 +1350,10 @@ impl<'a, 'b, 'c, 'tcx> Visitor<'tcx> for EncodeVisitor<'a, 'b, 'c, 'tcx> {
1350
1350
1351
1351
fn encode_info_for_items < ' a , ' tcx > ( ecx : & EncodeContext < ' a , ' tcx > ,
1352
1352
rbml_w : & mut Encoder )
1353
- -> CrateIndex < ' a , ' tcx > {
1353
+ -> IndexBuilder < ' a , ' tcx > {
1354
1354
let krate = ecx. tcx . map . krate ( ) ;
1355
1355
1356
- let mut index = CrateIndex :: new ( ecx) ;
1356
+ let mut index = IndexBuilder :: new ( ecx) ;
1357
1357
rbml_w. start_tag ( tag_items_data) ;
1358
1358
1359
1359
{
0 commit comments