@@ -342,25 +342,6 @@ impl<'a> PostExpansionVisitor<'a> {
342
342
}
343
343
}
344
344
345
- fn check_gat ( & self , generics : & ast:: Generics , span : Span ) {
346
- if !generics. params . is_empty ( ) {
347
- gate_feature_post ! (
348
- & self ,
349
- generic_associated_types,
350
- span,
351
- "generic associated types are unstable"
352
- ) ;
353
- }
354
- if !generics. where_clause . predicates . is_empty ( ) {
355
- gate_feature_post ! (
356
- & self ,
357
- generic_associated_types,
358
- span,
359
- "where clauses on associated types are unstable"
360
- ) ;
361
- }
362
- }
363
-
364
345
/// Feature gate `impl Trait` inside `type Alias = $type_expr;`.
365
346
fn check_impl_trait ( & self , ty : & ast:: Ty ) {
366
347
struct ImplTraitVisitor < ' a > {
@@ -719,7 +700,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
719
700
fn visit_assoc_item ( & mut self , i : & ' a ast:: AssocItem , ctxt : AssocCtxt ) {
720
701
let is_fn = match i. kind {
721
702
ast:: AssocItemKind :: Fn ( _) => true ,
722
- ast:: AssocItemKind :: TyAlias ( box ast:: TyAlias { ref generics , ref ty, .. } ) => {
703
+ ast:: AssocItemKind :: TyAlias ( box ast:: TyAlias { ref ty, .. } ) => {
723
704
if let ( Some ( _) , AssocCtxt :: Trait ) = ( ty, ctxt) {
724
705
gate_feature_post ! (
725
706
& self ,
@@ -731,7 +712,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
731
712
if let Some ( ty) = ty {
732
713
self . check_impl_trait ( ty) ;
733
714
}
734
- self . check_gat ( generics, i. span ) ;
735
715
false
736
716
}
737
717
_ => false ,
0 commit comments