@@ -40,16 +40,6 @@ use symbol::{keywords, Symbol};
4040use std:: { env} ;
4141
4242macro_rules! set {
43- // The const_fn feature also enables the min_const_fn feature, because `min_const_fn` allows
44- // the declaration `const fn`, but the `const_fn` feature gate enables things inside those
45- // functions that we do not want to expose to the user for now.
46- ( const_fn) => { {
47- fn f( features: & mut Features , _: Span ) {
48- features. const_fn = true ;
49- features. min_const_fn = true ;
50- }
51- f as fn ( & mut Features , Span )
52- } } ;
5343 ( $field: ident) => { {
5444 fn f( features: & mut Features , _: Span ) {
5545 features. $field = true ;
@@ -219,9 +209,6 @@ declare_features! (
219209 // Allows the definition of `const fn` functions with some advanced features.
220210 ( active, const_fn, "1.2.0" , Some ( 24111 ) , None ) ,
221211
222- // Allows the definition of `const fn` functions.
223- ( active, min_const_fn, "1.30.0" , Some ( 53555 ) , None ) ,
224-
225212 // Allows let bindings and destructuring in `const fn` functions and constants.
226213 ( active, const_let, "1.22.1" , Some ( 48821 ) , None ) ,
227214
@@ -690,6 +677,8 @@ declare_features! (
690677 ( accepted, extern_prelude, "1.30.0" , Some ( 44660 ) , None ) ,
691678 // Parentheses in patterns
692679 ( accepted, pattern_parentheses, "1.31.0" , Some ( 51087 ) , None ) ,
680+ // Allows the definition of `const fn` functions.
681+ ( accepted, min_const_fn, "1.31.0" , Some ( 53555 ) , None ) ,
693682) ;
694683
695684// If you change this, please modify src/doc/unstable-book as well. You must
@@ -1807,9 +1796,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
18071796 if header. asyncness . is_async ( ) {
18081797 gate_feature_post ! ( & self , async_await, span, "async fn is unstable" ) ;
18091798 }
1810- if header. constness . node == ast:: Constness :: Const {
1811- gate_feature_post ! ( & self , min_const_fn, span, "const fn is unstable" ) ;
1812- }
18131799 // stability of const fn methods are covered in
18141800 // visit_trait_item and visit_impl_item below; this is
18151801 // because default methods don't pass through this
@@ -1864,11 +1850,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
18641850 }
18651851
18661852 match ii. node {
1867- ast:: ImplItemKind :: Method ( ref sig, _) => {
1868- if sig. header . constness . node == ast:: Constness :: Const {
1869- gate_feature_post ! ( & self , min_const_fn, ii. span, "const fn is unstable" ) ;
1870- }
1871- }
1853+ ast:: ImplItemKind :: Method ( ..) => { }
18721854 ast:: ImplItemKind :: Existential ( ..) => {
18731855 gate_feature_post ! (
18741856 & self ,
0 commit comments