@@ -40,16 +40,6 @@ use symbol::{keywords, Symbol};
40
40
use std:: { env} ;
41
41
42
42
macro_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
- } } ;
53
43
( $field: ident) => { {
54
44
fn f( features: & mut Features , _: Span ) {
55
45
features. $field = true ;
@@ -219,9 +209,6 @@ declare_features! (
219
209
// Allows the definition of `const fn` functions with some advanced features.
220
210
( active, const_fn, "1.2.0" , Some ( 24111 ) , None ) ,
221
211
222
- // Allows the definition of `const fn` functions.
223
- ( active, min_const_fn, "1.30.0" , Some ( 53555 ) , None ) ,
224
-
225
212
// Allows let bindings and destructuring in `const fn` functions and constants.
226
213
( active, const_let, "1.22.1" , Some ( 48821 ) , None ) ,
227
214
@@ -690,6 +677,8 @@ declare_features! (
690
677
( accepted, extern_prelude, "1.30.0" , Some ( 44660 ) , None ) ,
691
678
// Parentheses in patterns
692
679
( 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 ) ,
693
682
) ;
694
683
695
684
// 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> {
1807
1796
if header. asyncness . is_async ( ) {
1808
1797
gate_feature_post ! ( & self , async_await, span, "async fn is unstable" ) ;
1809
1798
}
1810
- if header. constness . node == ast:: Constness :: Const {
1811
- gate_feature_post ! ( & self , min_const_fn, span, "const fn is unstable" ) ;
1812
- }
1813
1799
// stability of const fn methods are covered in
1814
1800
// visit_trait_item and visit_impl_item below; this is
1815
1801
// because default methods don't pass through this
@@ -1864,11 +1850,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
1864
1850
}
1865
1851
1866
1852
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 ( ..) => { }
1872
1854
ast:: ImplItemKind :: Existential ( ..) => {
1873
1855
gate_feature_post ! (
1874
1856
& self ,
0 commit comments