@@ -67,7 +67,6 @@ use syntax::ast;
67
67
use syntax:: ast:: * ;
68
68
use syntax:: errors;
69
69
use syntax:: ext:: hygiene:: { Mark , SyntaxContext } ;
70
- use syntax:: feature_gate:: { emit_feature_err, GateIssue } ;
71
70
use syntax:: print:: pprust;
72
71
use syntax:: ptr:: P ;
73
72
use syntax:: source_map:: { self , respan, CompilerDesugaringKind , Spanned } ;
@@ -3628,7 +3627,6 @@ impl<'a> LoweringContext<'a> {
3628
3627
ParamMode :: Optional ,
3629
3628
ImplTraitContext :: disallowed ( ) ,
3630
3629
) ;
3631
- self . check_self_struct_ctor_feature ( & qpath) ;
3632
3630
hir:: PatKind :: TupleStruct (
3633
3631
qpath,
3634
3632
pats. iter ( ) . map ( |x| self . lower_pat ( x) ) . collect ( ) ,
@@ -3643,7 +3641,6 @@ impl<'a> LoweringContext<'a> {
3643
3641
ParamMode :: Optional ,
3644
3642
ImplTraitContext :: disallowed ( ) ,
3645
3643
) ;
3646
- self . check_self_struct_ctor_feature ( & qpath) ;
3647
3644
hir:: PatKind :: Path ( qpath)
3648
3645
}
3649
3646
PatKind :: Struct ( ref path, ref fields, etc) => {
@@ -4039,7 +4036,6 @@ impl<'a> LoweringContext<'a> {
4039
4036
ParamMode :: Optional ,
4040
4037
ImplTraitContext :: disallowed ( ) ,
4041
4038
) ;
4042
- self . check_self_struct_ctor_feature ( & qpath) ;
4043
4039
hir:: ExprKind :: Path ( qpath)
4044
4040
}
4045
4041
ExprKind :: Break ( opt_label, ref opt_expr) => {
@@ -5102,18 +5098,6 @@ impl<'a> LoweringContext<'a> {
5102
5098
ThinVec :: new ( ) ) ) ;
5103
5099
P ( self . expr_call ( e. span , from_err, hir_vec ! [ e] ) )
5104
5100
}
5105
-
5106
- fn check_self_struct_ctor_feature ( & self , qp : & hir:: QPath ) {
5107
- if let hir:: QPath :: Resolved ( _, ref p) = qp {
5108
- if p. segments . len ( ) == 1 &&
5109
- p. segments [ 0 ] . ident . name == keywords:: SelfType . name ( ) &&
5110
- !self . sess . features_untracked ( ) . self_struct_ctor {
5111
- emit_feature_err ( & self . sess . parse_sess , "self_struct_ctor" ,
5112
- p. span , GateIssue :: Language ,
5113
- "`Self` struct constructors are unstable" ) ;
5114
- }
5115
- }
5116
- }
5117
5101
}
5118
5102
5119
5103
fn body_ids ( bodies : & BTreeMap < hir:: BodyId , hir:: Body > ) -> Vec < hir:: BodyId > {
0 commit comments