From ec74d3533a9b88505d56d0ae00a78acf2e702c92 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Fri, 5 Oct 2018 10:17:16 +0200 Subject: Stabilize `min_const_fn` --- src/libsyntax/attr/builtin.rs | 3 +-- src/libsyntax/feature_gate.rs | 9 +-------- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/attr/builtin.rs b/src/libsyntax/attr/builtin.rs index f1cec422420..1cc2e62a9c6 100644 --- a/src/libsyntax/attr/builtin.rs +++ b/src/libsyntax/attr/builtin.rs @@ -107,8 +107,7 @@ pub struct Stability { pub level: StabilityLevel, pub feature: Symbol, pub rustc_depr: Option, - /// `None` means the function is stable but needs to be allowed by the - /// `min_const_fn` feature + /// `None` means the function is stable but needs to be a stable const fn, too /// `Some` contains the feature gate required to be able to use the function /// as const fn pub const_stability: Option, diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index adbe2f9d439..e854e3d6760 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -1806,9 +1806,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { if header.asyncness.is_async() { gate_feature_post!(&self, async_await, span, "async fn is unstable"); } - if header.constness.node == ast::Constness::Const { - gate_feature_post!(&self, min_const_fn, span, "const fn is unstable"); - } // stability of const fn methods are covered in // visit_trait_item and visit_impl_item below; this is // because default methods don't pass through this @@ -1863,11 +1860,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { } match ii.node { - ast::ImplItemKind::Method(ref sig, _) => { - if sig.header.constness.node == ast::Constness::Const { - gate_feature_post!(&self, min_const_fn, ii.span, "const fn is unstable"); - } - } + ast::ImplItemKind::Method(..) => {} ast::ImplItemKind::Existential(..) => { gate_feature_post!( &self, -- cgit 1.4.1-3-g733a5