File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
compiler/rustc_hir_analysis/src/astconv Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -2391,12 +2391,15 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
23912391 let substs = self . ast_path_substs_for_ty ( span, did, item_segment. 0 ) ;
23922392 self . normalize_ty ( span, tcx. mk_opaque ( did, substs) )
23932393 }
2394+ Res :: Def ( DefKind :: TyAlias , def_id) => {
2395+ assert_eq ! ( opt_self_ty, None ) ;
2396+ self . prohibit_generics ( path. segments . split_last ( ) . unwrap ( ) . 1 . iter ( ) , |_| { } ) ;
2397+ let item_segment = path. segments . split_last ( ) . unwrap ( ) ;
2398+ let substs = self . ast_path_substs_for_ty ( span, def_id, item_segment. 0 ) ;
2399+ self . normalize_ty ( span, tcx. mk_ty_alias ( def_id, substs) )
2400+ }
23942401 Res :: Def (
2395- DefKind :: Enum
2396- | DefKind :: TyAlias
2397- | DefKind :: Struct
2398- | DefKind :: Union
2399- | DefKind :: ForeignTy ,
2402+ DefKind :: Enum | DefKind :: Struct | DefKind :: Union | DefKind :: ForeignTy ,
24002403 did,
24012404 ) => {
24022405 assert_eq ! ( opt_self_ty, None ) ;
You can’t perform that action at this time.
0 commit comments