@@ -636,6 +636,7 @@ impl<'a, 'tcx> CrateMetadata {
636
636
def : def,
637
637
vis : ty:: Visibility :: Public ,
638
638
span : DUMMY_SP ,
639
+ is_import : false ,
639
640
} ) ;
640
641
}
641
642
}
@@ -675,6 +676,7 @@ impl<'a, 'tcx> CrateMetadata {
675
676
ident : Ident :: from_str ( & self . item_name ( child_index) ) ,
676
677
vis : self . get_visibility ( child_index) ,
677
678
span : self . entry ( child_index) . span . decode ( ( self , sess) ) ,
679
+ is_import : false ,
678
680
} ) ;
679
681
}
680
682
}
@@ -692,16 +694,20 @@ impl<'a, 'tcx> CrateMetadata {
692
694
( self . get_def ( child_index) , def_key. disambiguated_data . data . get_opt_name ( ) ) {
693
695
let ident = Ident :: from_str ( & name) ;
694
696
let vis = self . get_visibility ( child_index) ;
695
- callback ( def:: Export { def, ident, vis, span } ) ;
697
+ let is_import = false ;
698
+ callback ( def:: Export { def, ident, vis, span, is_import } ) ;
696
699
// For non-reexport structs and variants add their constructors to children.
697
700
// Reexport lists automatically contain constructors when necessary.
698
701
match def {
699
702
Def :: Struct ( ..) => {
700
703
if let Some ( ctor_def_id) = self . get_struct_ctor_def_id ( child_index) {
701
704
let ctor_kind = self . get_ctor_kind ( child_index) ;
702
705
let ctor_def = Def :: StructCtor ( ctor_def_id, ctor_kind) ;
703
- let vis = self . get_visibility ( ctor_def_id. index ) ;
704
- callback ( def:: Export { def : ctor_def, ident, vis, span } ) ;
706
+ callback ( def:: Export {
707
+ def : ctor_def,
708
+ vis : self . get_visibility ( ctor_def_id. index ) ,
709
+ ident, span, is_import,
710
+ } ) ;
705
711
}
706
712
}
707
713
Def :: Variant ( def_id) => {
@@ -710,7 +716,7 @@ impl<'a, 'tcx> CrateMetadata {
710
716
let ctor_kind = self . get_ctor_kind ( child_index) ;
711
717
let ctor_def = Def :: VariantCtor ( def_id, ctor_kind) ;
712
718
let vis = self . get_visibility ( child_index) ;
713
- callback ( def:: Export { def : ctor_def, ident, vis, span } ) ;
719
+ callback ( def:: Export { def : ctor_def, ident, vis, span, is_import } ) ;
714
720
}
715
721
_ => { }
716
722
}
0 commit comments