@@ -331,10 +331,8 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
331
331
332
332
// These items live in the type namespace.
333
333
ItemTy ( ..) => {
334
- let parent_link = ModuleParentLink ( parent, name) ;
335
334
let def = Def :: TyAlias ( self . ast_map . local_def_id ( item. id ) ) ;
336
- let module = self . new_module ( parent_link, Some ( def) , false , is_public) ;
337
- self . define ( parent, name, TypeNS , ( module, sp) ) ;
335
+ self . define ( parent, name, TypeNS , ( def, sp, modifiers) ) ;
338
336
parent
339
337
}
340
338
@@ -505,7 +503,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
505
503
}
506
504
507
505
match def {
508
- Def :: Mod ( _) | Def :: ForeignMod ( _) | Def :: Enum ( ..) | Def :: TyAlias ( .. ) => {
506
+ Def :: Mod ( _) | Def :: ForeignMod ( _) | Def :: Enum ( ..) => {
509
507
debug ! ( "(building reduced graph for external crate) building module {} {}" ,
510
508
final_ident,
511
509
is_public) ;
@@ -562,7 +560,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
562
560
let module = self . new_module ( parent_link, Some ( def) , true , is_public) ;
563
561
self . try_define ( new_parent, name, TypeNS , ( module, DUMMY_SP ) ) ;
564
562
}
565
- Def :: AssociatedTy ( ..) => {
563
+ Def :: TyAlias ( .. ) | Def :: AssociatedTy ( ..) => {
566
564
debug ! ( "(building reduced graph for external crate) building type {}" ,
567
565
final_ident) ;
568
566
self . try_define ( new_parent, name, TypeNS , ( def, DUMMY_SP , modifiers) ) ;
0 commit comments