From 4d25c51f693c4155a278f9f1dd37b0ad13008041 Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Wed, 26 Jan 2022 12:59:14 -0800 Subject: [PATCH 01/11] libunwind: readd link attrs to _Unwind_Backtrace It seems the removal of these in 1c07096a45a15de64216f12ec726333870e372b1 was unintended; readding them fixes the build. fixes rust-lang/rust#93349 --- library/unwind/src/libunwind.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/unwind/src/libunwind.rs b/library/unwind/src/libunwind.rs index 5e15fe75a2463..fe98e860ace78 100644 --- a/library/unwind/src/libunwind.rs +++ b/library/unwind/src/libunwind.rs @@ -246,6 +246,10 @@ if #[cfg(not(all(target_os = "ios", target_arch = "arm")))] { extern "C-unwind" { pub fn _Unwind_RaiseException(exception: *mut _Unwind_Exception) -> _Unwind_Reason_Code; } + #[cfg_attr( + all(feature = "llvm-libunwind", any(target_os = "fuchsia", target_os = "linux")), + link(name = "unwind", kind = "static", modifiers = "-bundle") + )] extern "C" { pub fn _Unwind_Backtrace(trace: _Unwind_Trace_Fn, trace_argument: *mut c_void) From e89efb8634a1ffc8e7573b6f4cf53aa9b36d92ae Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 7 Mar 2022 12:04:51 +0100 Subject: [PATCH 02/11] Remove unneeded whitespace generation and use CSS instead instead to align line numbers to the right --- src/librustdoc/html/sources.rs | 10 ++-------- src/librustdoc/html/static/css/rustdoc.css | 3 +++ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/librustdoc/html/sources.rs b/src/librustdoc/html/sources.rs index bae04f2095a3d..9fba6e9116282 100644 --- a/src/librustdoc/html/sources.rs +++ b/src/librustdoc/html/sources.rs @@ -272,22 +272,16 @@ crate fn print_src( ) { let lines = s.lines().count(); let mut line_numbers = Buffer::empty_from(buf); - let mut cols = 0; - let mut tmp = lines; - while tmp > 0 { - cols += 1; - tmp /= 10; - } line_numbers.write_str("
");
     match source_context {
         SourceContext::Standalone => {
             for line in 1..=lines {
-                writeln!(line_numbers, "{0:1$}", line, cols)
+                writeln!(line_numbers, "{0}", line)
             }
         }
         SourceContext::Embedded { offset } => {
             for line in 1..=lines {
-                writeln!(line_numbers, "{0:1$}", line + offset, cols)
+                writeln!(line_numbers, "{0}", line + offset)
             }
         }
     }
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index f1e0a89883ab8..9a4b382a304ff 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -541,6 +541,9 @@ h2.location a {
 	text-decoration: underline;
 }
 
+.line-numbers {
+	text-align: right;
+}
 .rustdoc:not(.source) .example-wrap > pre:not(.line-number) {
 	width: 100%;
 	overflow-x: auto;

From f23d6d3a47c15bc0fc3fbf2abdd318c3a2c09c7c Mon Sep 17 00:00:00 2001
From: Guillaume Gomez 
Date: Mon, 7 Mar 2022 12:08:14 +0100
Subject: [PATCH 03/11] Add GUI test to ensure that line numbers text is
 aligned to the right

---
 src/test/rustdoc-gui/source-code-page.goml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/test/rustdoc-gui/source-code-page.goml b/src/test/rustdoc-gui/source-code-page.goml
index 375ff4878e525..ad7080c39b842 100644
--- a/src/test/rustdoc-gui/source-code-page.goml
+++ b/src/test/rustdoc-gui/source-code-page.goml
@@ -14,3 +14,6 @@ assert-attribute: (".line-numbers > span:nth-child(6)", {"class": "line-highligh
 assert-attribute-false: (".line-numbers > span:nth-child(7)", {"class": "line-highlighted"})
 // This is to ensure that the content is correctly align with the line numbers.
 compare-elements-position: ("//*[@id='1']", ".rust > code > span", ("y"))
+
+// Assert that the line numbers text is aligned to the right.
+assert-css: (".line-numbers", {"text-align": "right"})

From a496fa4fc15276da2a47b84bcc43824a7c0c667b Mon Sep 17 00:00:00 2001
From: Guillaume Gomez 
Date: Mon, 7 Mar 2022 15:10:24 +0100
Subject: [PATCH 04/11] Update minifier version

---
 Cargo.lock                | 4 ++--
 src/librustdoc/Cargo.toml | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 1af01a42afd6a..fd8d461c54524 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2273,9 +2273,9 @@ dependencies = [
 
 [[package]]
 name = "minifier"
-version = "0.0.42"
+version = "0.0.43"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55a1388517eda8a68875243b650c26997e055a33d82571b5a0349129faef7d99"
+checksum = "d81352bda6f4d04af1720afaa762054f66e16caffd93c1f86461a1c0ac4e695e"
 dependencies = [
  "macro-utils",
 ]
diff --git a/src/librustdoc/Cargo.toml b/src/librustdoc/Cargo.toml
index 18a3498e34eba..cc5c583bea8e2 100644
--- a/src/librustdoc/Cargo.toml
+++ b/src/librustdoc/Cargo.toml
@@ -11,7 +11,7 @@ arrayvec = { version = "0.7", default-features = false }
 askama = { version = "0.11", default-features = false, features = ["config"] }
 atty = "0.2"
 pulldown-cmark = { version = "0.9", default-features = false }
-minifier = "0.0.42"
+minifier = "0.0.43"
 rayon = "1.5.1"
 serde = { version = "1.0", features = ["derive"] }
 serde_json = "1.0"

From 7723506d13a03e3191d407aaf3709f157bf75193 Mon Sep 17 00:00:00 2001
From: Eric Holk 
Date: Tue, 8 Feb 2022 16:33:15 -0800
Subject: [PATCH 05/11] Stabilize const_fn_fn_ptr_basics and
 const_fn_trait_bound

---
 .../src/transform/check_consts/check.rs       |  27 +----
 .../src/transform/check_consts/ops.rs         | 102 ------------------
 compiler/rustc_feature/src/accepted.rs        |   4 +
 compiler/rustc_feature/src/active.rs          |   4 -
 library/alloc/src/lib.rs                      |   2 +-
 library/core/src/lib.rs                       |   4 +-
 library/proc_macro/src/lib.rs                 |   4 +-
 library/std/src/lib.rs                        |   4 +-
 .../clippy_utils/src/qualify_min_const_fn.rs  |  22 +---
 9 files changed, 16 insertions(+), 157 deletions(-)

diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
index b78924490cae8..e5d7560e34944 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
@@ -359,7 +359,6 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
             match *ty.kind() {
                 ty::Ref(_, _, hir::Mutability::Mut) => self.check_op(ops::ty::MutRef(kind)),
                 ty::Opaque(..) => self.check_op(ops::ty::ImplTrait),
-                ty::FnPtr(..) => self.check_op(ops::ty::FnPtr(kind)),
 
                 ty::Dynamic(preds, _) => {
                     for pred in preds.iter() {
@@ -395,6 +394,7 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
                     | ty::PredicateKind::Projection(_)
                     | ty::PredicateKind::ConstEvaluatable(..)
                     | ty::PredicateKind::ConstEquate(..)
+                    | ty::PredicateKind::Trait(..)
                     | ty::PredicateKind::TypeWellFormedFromEnv(..) => continue,
                     ty::PredicateKind::ObjectSafe(_) => {
                         bug!("object safe predicate on function: {:#?}", predicate)
@@ -405,27 +405,6 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
                     ty::PredicateKind::Subtype(_) | ty::PredicateKind::Coerce(_) => {
                         bug!("subtype/coerce predicate on function: {:#?}", predicate)
                     }
-                    ty::PredicateKind::Trait(pred) => {
-                        if Some(pred.def_id()) == tcx.lang_items().sized_trait() {
-                            continue;
-                        }
-                        match pred.self_ty().kind() {
-                            ty::Param(p) => {
-                                let generics = tcx.generics_of(current);
-                                let def = generics.type_param(p, tcx);
-                                let span = tcx.def_span(def.def_id);
-
-                                // These are part of the function signature, so treat them like
-                                // arguments when determining importance.
-                                let kind = LocalKind::Arg;
-
-                                self.check_op_spanned(ops::ty::TraitBound(kind), span);
-                            }
-                            // other kinds of bounds are either tautologies
-                            // or cause errors in other passes
-                            _ => continue,
-                        }
-                    }
                 }
             }
             match predicates.parent {
@@ -613,7 +592,9 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
                 ),
                 _,
                 _,
-            ) => self.check_op(ops::FnPtrCast),
+            ) => {
+                // Nothing to do here. Function pointer casts are allowed now.
+            }
 
             Rvalue::Cast(CastKind::Pointer(PointerCast::Unsize), _, _) => {
                 // Nothing to check here (`check_local_or_return_ty` ensures no trait objects occur
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
index f6b92df92c044..be6a54c05b7d9 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
@@ -355,31 +355,6 @@ impl<'tcx> NonConstOp<'tcx> for FnCallUnstable {
     }
 }
 
-#[derive(Debug)]
-pub struct FnPtrCast;
-impl<'tcx> NonConstOp<'tcx> for FnPtrCast {
-    fn status_in_item(&self, ccx: &ConstCx<'_, 'tcx>) -> Status {
-        if ccx.const_kind() != hir::ConstContext::ConstFn {
-            Status::Allowed
-        } else {
-            Status::Unstable(sym::const_fn_fn_ptr_basics)
-        }
-    }
-
-    fn build_error(
-        &self,
-        ccx: &ConstCx<'_, 'tcx>,
-        span: Span,
-    ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> {
-        feature_err(
-            &ccx.tcx.sess.parse_sess,
-            sym::const_fn_fn_ptr_basics,
-            span,
-            &format!("function pointer casts are not allowed in {}s", ccx.const_kind()),
-        )
-    }
-}
-
 #[derive(Debug)]
 pub struct Generator(pub hir::GeneratorKind);
 impl<'tcx> NonConstOp<'tcx> for Generator {
@@ -821,40 +796,6 @@ pub mod ty {
         }
     }
 
-    #[derive(Debug)]
-    pub struct FnPtr(pub mir::LocalKind);
-    impl<'tcx> NonConstOp<'tcx> for FnPtr {
-        fn importance(&self) -> DiagnosticImportance {
-            match self.0 {
-                mir::LocalKind::Var | mir::LocalKind::Temp => DiagnosticImportance::Secondary,
-                mir::LocalKind::ReturnPointer | mir::LocalKind::Arg => {
-                    DiagnosticImportance::Primary
-                }
-            }
-        }
-
-        fn status_in_item(&self, ccx: &ConstCx<'_, 'tcx>) -> Status {
-            if ccx.const_kind() != hir::ConstContext::ConstFn {
-                Status::Allowed
-            } else {
-                Status::Unstable(sym::const_fn_fn_ptr_basics)
-            }
-        }
-
-        fn build_error(
-            &self,
-            ccx: &ConstCx<'_, 'tcx>,
-            span: Span,
-        ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> {
-            feature_err(
-                &ccx.tcx.sess.parse_sess,
-                sym::const_fn_fn_ptr_basics,
-                span,
-                &format!("function pointers cannot appear in {}s", ccx.const_kind()),
-            )
-        }
-    }
-
     #[derive(Debug)]
     pub struct ImplTrait;
     impl<'tcx> NonConstOp<'tcx> for ImplTrait {
@@ -876,49 +817,6 @@ pub mod ty {
         }
     }
 
-    #[derive(Debug)]
-    pub struct TraitBound(pub mir::LocalKind);
-    impl<'tcx> NonConstOp<'tcx> for TraitBound {
-        fn importance(&self) -> DiagnosticImportance {
-            match self.0 {
-                mir::LocalKind::Var | mir::LocalKind::Temp => DiagnosticImportance::Secondary,
-                mir::LocalKind::ReturnPointer | mir::LocalKind::Arg => {
-                    DiagnosticImportance::Primary
-                }
-            }
-        }
-
-        fn status_in_item(&self, ccx: &ConstCx<'_, 'tcx>) -> Status {
-            if ccx.const_kind() != hir::ConstContext::ConstFn {
-                Status::Allowed
-            } else {
-                Status::Unstable(sym::const_fn_trait_bound)
-            }
-        }
-
-        fn build_error(
-            &self,
-            ccx: &ConstCx<'_, 'tcx>,
-            span: Span,
-        ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> {
-            let mut err = feature_err(
-                &ccx.tcx.sess.parse_sess,
-                sym::const_fn_trait_bound,
-                span,
-                "trait bounds other than `Sized` on const fn parameters are unstable",
-            );
-
-            match ccx.fn_sig() {
-                Some(fn_sig) if !fn_sig.span.contains(span) => {
-                    err.span_label(fn_sig.span, "function declared as const here");
-                }
-                _ => {}
-            }
-
-            err
-        }
-    }
-
     #[derive(Debug)]
     pub struct DynTrait(pub mir::LocalKind);
     impl<'tcx> NonConstOp<'tcx> for DynTrait {
diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs
index d43f926d0a56a..b649a548750ad 100644
--- a/compiler/rustc_feature/src/accepted.rs
+++ b/compiler/rustc_feature/src/accepted.rs
@@ -86,6 +86,10 @@ declare_features! (
     (accepted, conservative_impl_trait, "1.26.0", Some(34511), None),
     /// Allows calling constructor functions in `const fn`.
     (accepted, const_constructor, "1.40.0", Some(61456), None),
+    /// Allows using and casting function pointers in a `const fn`.
+    (accepted, const_fn_fn_ptr_basics, "1.60.0", Some(57563), None),
+    /// Allows trait bounds in `const fn`.
+    (accepted, const_fn_trait_bound, "1.60.0", Some(93706), None),
     /// Allows calling `transmute` in const fn
     (accepted, const_fn_transmute, "1.56.0", Some(53605), None),
     /// Allows accessing fields of unions inside `const` functions.
diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs
index 1f7dc769512bb..e48039148d9e3 100644
--- a/compiler/rustc_feature/src/active.rs
+++ b/compiler/rustc_feature/src/active.rs
@@ -338,10 +338,6 @@ declare_features! (
     (active, const_extern_fn, "1.40.0", Some(64926), None),
     /// Allows basic arithmetic on floating point types in a `const fn`.
     (active, const_fn_floating_point_arithmetic, "1.48.0", Some(57241), None),
-    /// Allows using and casting function pointers in a `const fn`.
-    (active, const_fn_fn_ptr_basics, "1.48.0", Some(57563), None),
-    /// Allows trait bounds in `const fn`.
-    (active, const_fn_trait_bound, "1.53.0", Some(93706), None),
     /// Allows `for _ in _` loops in const contexts.
     (active, const_for, "1.56.0", Some(87575), None),
     /// Allows argument and return position `impl Trait` in a `const fn`.
diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs
index 82493f9c398cb..0a180b83355e0 100644
--- a/library/alloc/src/lib.rs
+++ b/library/alloc/src/lib.rs
@@ -140,7 +140,7 @@
 #![feature(box_syntax)]
 #![feature(cfg_sanitize)]
 #![feature(const_deref)]
-#![feature(const_fn_trait_bound)]
+#![cfg_attr(bootstrap, feature(const_fn_trait_bound))]
 #![feature(const_mut_refs)]
 #![feature(const_ptr_write)]
 #![feature(const_precise_live_drops)]
diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs
index 45fbcf44b350c..d337592d5f03a 100644
--- a/library/core/src/lib.rs
+++ b/library/core/src/lib.rs
@@ -158,8 +158,8 @@
 #![feature(cfg_target_has_atomic)]
 #![feature(cfg_target_has_atomic_equal_alignment)]
 #![feature(const_fn_floating_point_arithmetic)]
-#![feature(const_fn_fn_ptr_basics)]
-#![feature(const_fn_trait_bound)]
+#![cfg_attr(bootstrap, feature(const_fn_fn_ptr_basics))]
+#![cfg_attr(bootstrap, feature(const_fn_trait_bound))]
 #![feature(const_impl_trait)]
 #![feature(const_mut_refs)]
 #![feature(const_precise_live_drops)]
diff --git a/library/proc_macro/src/lib.rs b/library/proc_macro/src/lib.rs
index c5afca6d56a2d..31900912df468 100644
--- a/library/proc_macro/src/lib.rs
+++ b/library/proc_macro/src/lib.rs
@@ -20,8 +20,8 @@
 #![feature(rustc_allow_const_fn_unstable)]
 #![feature(nll)]
 #![feature(staged_api)]
-#![feature(const_fn_trait_bound)]
-#![feature(const_fn_fn_ptr_basics)]
+#![cfg_attr(bootstrap, feature(const_fn_trait_bound))]
+#![cfg_attr(bootstrap, feature(const_fn_fn_ptr_basics))]
 #![feature(allow_internal_unstable)]
 #![feature(decl_macro)]
 #![feature(extern_types)]
diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs
index 36e6032b5e4e5..5b02e711aab2d 100644
--- a/library/std/src/lib.rs
+++ b/library/std/src/lib.rs
@@ -242,8 +242,8 @@
 #![feature(char_internals)]
 #![feature(concat_bytes)]
 #![feature(concat_idents)]
-#![feature(const_fn_fn_ptr_basics)]
-#![feature(const_fn_trait_bound)]
+#![cfg_attr(bootstrap, feature(const_fn_fn_ptr_basics))]
+#![cfg_attr(bootstrap, feature(const_fn_trait_bound))]
 #![feature(const_format_args)]
 #![feature(const_io_structs)]
 #![feature(const_ip)]
diff --git a/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs b/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs
index c039fec955db9..891531951c1a0 100644
--- a/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs
+++ b/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs
@@ -32,32 +32,12 @@ pub fn is_min_const_fn<'a, 'tcx>(tcx: TyCtxt<'tcx>, body: &'a Body<'tcx>, msrv:
                 | ty::PredicateKind::Projection(_)
                 | ty::PredicateKind::ConstEvaluatable(..)
                 | ty::PredicateKind::ConstEquate(..)
+                | ty::PredicateKind::Trait(..)
                 | ty::PredicateKind::TypeWellFormedFromEnv(..) => continue,
                 ty::PredicateKind::ObjectSafe(_) => panic!("object safe predicate on function: {:#?}", predicate),
                 ty::PredicateKind::ClosureKind(..) => panic!("closure kind predicate on function: {:#?}", predicate),
                 ty::PredicateKind::Subtype(_) => panic!("subtype predicate on function: {:#?}", predicate),
                 ty::PredicateKind::Coerce(_) => panic!("coerce predicate on function: {:#?}", predicate),
-                ty::PredicateKind::Trait(pred) => {
-                    if Some(pred.def_id()) == tcx.lang_items().sized_trait() {
-                        continue;
-                    }
-                    match pred.self_ty().kind() {
-                        ty::Param(ref p) => {
-                            let generics = tcx.generics_of(current);
-                            let def = generics.type_param(p, tcx);
-                            let span = tcx.def_span(def.def_id);
-                            return Err((
-                                span,
-                                "trait bounds other than `Sized` \
-                                 on const fn parameters are unstable"
-                                    .into(),
-                            ));
-                        },
-                        // other kinds of bounds are either tautologies
-                        // or cause errors in other passes
-                        _ => continue,
-                    }
-                },
             }
         }
         match predicates.parent {

From 8fc835831c1a84ba27d8bbafec480f02b2e29663 Mon Sep 17 00:00:00 2001
From: Eric Holk 
Date: Wed, 9 Feb 2022 10:53:40 -0800
Subject: [PATCH 06/11] Update tests after feature stabilization

---
 .../src/transform/check_consts/check.rs       |  16 --
 .../src/transform/check_consts/ops.rs         |  43 -----
 .../borrowck/issue-88434-minimal-example.rs   |   1 -
 .../issue-88434-minimal-example.stderr        |   8 +-
 ...ssue-88434-removal-index-should-be-less.rs |   1 -
 ...-88434-removal-index-should-be-less.stderr |   8 +-
 .../generic_const_exprs/issue-85848.rs        |   2 +-
 .../ui/const-generics/issues/issue-79674.rs   |   2 +-
 src/test/ui/consts/auxiliary/const_fn_lib.rs  |   1 -
 src/test/ui/consts/const-block-const-bound.rs |   2 +-
 .../ui/consts/const-eval/const_fn_ptr.stderr  |  14 +-
 .../const-eval/const_fn_ptr_fail2.stderr      |  10 --
 src/test/ui/consts/const-eval/issue-49296.rs  |   2 -
 .../ui/consts/const-eval/issue-49296.stderr   |   2 +-
 .../const-eval/issue-70804-fn-subtyping.rs    |   1 -
 .../const-extern-fn-min-const-fn.rs           |   2 -
 .../const-extern-fn-min-const-fn.stderr       |  24 +--
 src/test/ui/consts/const-fn.rs                |   1 -
 .../consts/const_fn_trait_bound.gated.stderr  |   8 -
 src/test/ui/consts/const_fn_trait_bound.rs    |  17 --
 .../consts/const_fn_trait_bound.stock.stderr  |  30 ----
 src/test/ui/consts/issue-37550-1.rs           |   4 +-
 src/test/ui/consts/issue-37550-1.stderr       |  12 --
 src/test/ui/consts/issue-37550.rs             |   2 -
 src/test/ui/consts/issue-46553.rs             |   1 -
 src/test/ui/consts/issue-56164.rs             |   2 -
 src/test/ui/consts/issue-56164.stderr         |   4 +-
 src/test/ui/consts/issue-88071.rs             |   1 -
 .../consts/min_const_fn/allow_const_fn_ptr.rs |  15 --
 .../min_const_fn/allow_const_fn_ptr.stderr    |  17 --
 .../allow_const_fn_ptr_run_pass.rs            |   2 -
 .../ui/consts/min_const_fn/cast_errors.rs     |  17 --
 .../ui/consts/min_const_fn/cast_errors.stderr |  75 --------
 src/test/ui/consts/min_const_fn/cast_fn.rs    |  11 ++
 .../ui/consts/min_const_fn/cmp_fn_pointers.rs |   2 -
 .../min_const_fn/cmp_fn_pointers.stderr       |  23 +--
 .../ui/consts/min_const_fn/min_const_fn.rs    |  28 +--
 .../consts/min_const_fn/min_const_fn.stderr   | 170 ++----------------
 .../consts/min_const_fn/min_const_fn_dyn.rs   |   4 +-
 .../min_const_fn/min_const_fn_dyn.stderr      |  25 ---
 .../min_const_fn/min_const_fn_fn_ptr.rs       |  19 --
 .../min_const_fn/min_const_fn_fn_ptr.stderr   |  21 ---
 .../consts/miri_unleashed/abi-mismatch.stderr |  10 --
 .../ui/consts/unstable-const-fn-in-libcore.rs |   1 -
 src/test/ui/nll/issue-55825-const-fn.rs       |   4 +-
 src/test/ui/nll/issue-55825-const-fn.stderr   |  12 --
 ...caller-location-fnptr-rt-ctfe-equiv.stderr |  19 +-
 .../auxiliary/cross-crate.rs                  |   1 -
 .../call-generic-in-impl.rs                   |   1 -
 .../call-generic-method-chain.rs              |   1 -
 .../call-generic-method-dup-bound.rs          |   1 -
 .../call-generic-method-fail.rs               |   1 -
 .../call-generic-method-fail.stderr           |   6 +-
 .../call-generic-method-nonconst-bound.rs     |   2 -
 .../call-generic-method-nonconst.rs           |   1 -
 .../call-generic-method-nonconst.stderr       |   6 +-
 .../call-generic-method-pass.rs               |   1 -
 .../const-closures.rs                         |   1 -
 .../const-default-method-bodies.rs            |   1 -
 .../const-default-method-bodies.stderr        |   6 +-
 .../const-drop-bound.rs                       |   1 -
 .../const-drop-fail.precise.stderr            |  18 +-
 .../const-drop-fail.rs                        |   1 -
 .../const-drop-fail.stock.stderr              |  18 +-
 .../rfc-2632-const-trait-impl/const-drop.rs   |   1 -
 ...ault-method-body-is-const-body-checking.rs |   1 -
 ...-method-body-is-const-body-checking.stderr |   6 +-
 ...ault-method-body-is-const-same-trait-ck.rs |   1 -
 ...-method-body-is-const-same-trait-ck.stderr |   6 +-
 ...lt-method-body-is-const-with-staged-api.rs |   1 -
 .../generic-bound.rs                          |   1 -
 .../impl-with-default-fn-fail.rs              |   1 -
 .../impl-with-default-fn-fail.stderr          |   6 +-
 .../impl-with-default-fn-pass.rs              |   1 -
 .../inherent-impl-const-bounds.rs             |   1 -
 .../rfc-2632-const-trait-impl/issue-88155.rs  |   1 -
 .../issue-88155.stderr                        |   6 +-
 .../rfc-2632-const-trait-impl/issue-92111.rs  |   1 -
 .../issue-92230-wf-super-trait-env.rs         |   1 -
 .../non-const-op-in-closure-in-const.rs       |   1 -
 .../trait-default-body-stability.rs           |   1 -
 .../trait-where-clause-run.rs                 |   1 -
 .../trait-where-clause-self-referential.rs    |   1 -
 .../trait-where-clause.rs                     |   1 -
 .../trait-where-clause.stderr                 |  20 +--
 .../ui/type-alias-impl-trait/issue-53096.rs   |   2 +-
 86 files changed, 107 insertions(+), 718 deletions(-)
 delete mode 100644 src/test/ui/consts/const_fn_trait_bound.gated.stderr
 delete mode 100644 src/test/ui/consts/const_fn_trait_bound.rs
 delete mode 100644 src/test/ui/consts/const_fn_trait_bound.stock.stderr
 delete mode 100644 src/test/ui/consts/issue-37550-1.stderr
 delete mode 100644 src/test/ui/consts/min_const_fn/allow_const_fn_ptr.rs
 delete mode 100644 src/test/ui/consts/min_const_fn/allow_const_fn_ptr.stderr
 delete mode 100644 src/test/ui/consts/min_const_fn/cast_errors.rs
 delete mode 100644 src/test/ui/consts/min_const_fn/cast_errors.stderr
 create mode 100644 src/test/ui/consts/min_const_fn/cast_fn.rs
 delete mode 100644 src/test/ui/consts/min_const_fn/min_const_fn_dyn.stderr
 delete mode 100644 src/test/ui/consts/min_const_fn/min_const_fn_fn_ptr.rs
 delete mode 100644 src/test/ui/consts/min_const_fn/min_const_fn_fn_ptr.stderr
 delete mode 100644 src/test/ui/nll/issue-55825-const-fn.stderr

diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
index e5d7560e34944..fc53f2785ca0c 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
@@ -359,22 +359,6 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
             match *ty.kind() {
                 ty::Ref(_, _, hir::Mutability::Mut) => self.check_op(ops::ty::MutRef(kind)),
                 ty::Opaque(..) => self.check_op(ops::ty::ImplTrait),
-
-                ty::Dynamic(preds, _) => {
-                    for pred in preds.iter() {
-                        match pred.skip_binder() {
-                            ty::ExistentialPredicate::AutoTrait(_)
-                            | ty::ExistentialPredicate::Projection(_) => {
-                                self.check_op(ops::ty::DynTrait(kind))
-                            }
-                            ty::ExistentialPredicate::Trait(trait_ref) => {
-                                if Some(trait_ref.def_id) != self.tcx.lang_items().sized_trait() {
-                                    self.check_op(ops::ty::DynTrait(kind))
-                                }
-                            }
-                        }
-                    }
-                }
                 _ => {}
             }
         }
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
index be6a54c05b7d9..00c28fef5d2ab 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
@@ -817,49 +817,6 @@ pub mod ty {
         }
     }
 
-    #[derive(Debug)]
-    pub struct DynTrait(pub mir::LocalKind);
-    impl<'tcx> NonConstOp<'tcx> for DynTrait {
-        fn importance(&self) -> DiagnosticImportance {
-            match self.0 {
-                mir::LocalKind::Var | mir::LocalKind::Temp => DiagnosticImportance::Secondary,
-                mir::LocalKind::ReturnPointer | mir::LocalKind::Arg => {
-                    DiagnosticImportance::Primary
-                }
-            }
-        }
-
-        fn status_in_item(&self, ccx: &ConstCx<'_, 'tcx>) -> Status {
-            if ccx.const_kind() != hir::ConstContext::ConstFn {
-                Status::Allowed
-            } else {
-                Status::Unstable(sym::const_fn_trait_bound)
-            }
-        }
-
-        fn build_error(
-            &self,
-            ccx: &ConstCx<'_, 'tcx>,
-            span: Span,
-        ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> {
-            let mut err = feature_err(
-                &ccx.tcx.sess.parse_sess,
-                sym::const_fn_trait_bound,
-                span,
-                "trait objects in const fn are unstable",
-            );
-
-            match ccx.fn_sig() {
-                Some(fn_sig) if !fn_sig.span.contains(span) => {
-                    err.span_label(fn_sig.span, "function declared as const here");
-                }
-                _ => {}
-            }
-
-            err
-        }
-    }
-
     /// A trait bound with the `?const Trait` opt-out
     #[derive(Debug)]
     pub struct TraitBoundNotConst;
diff --git a/src/test/ui/borrowck/issue-88434-minimal-example.rs b/src/test/ui/borrowck/issue-88434-minimal-example.rs
index db348a50aa429..632f8dc3ad6f5 100644
--- a/src/test/ui/borrowck/issue-88434-minimal-example.rs
+++ b/src/test/ui/borrowck/issue-88434-minimal-example.rs
@@ -1,4 +1,3 @@
-#![feature(const_fn_trait_bound)]
 // Regression test related to issue 88434
 
 const _CONST: &() = &f(&|_| {});
diff --git a/src/test/ui/borrowck/issue-88434-minimal-example.stderr b/src/test/ui/borrowck/issue-88434-minimal-example.stderr
index 845e1bdba8fc0..d9635e1ee464c 100644
--- a/src/test/ui/borrowck/issue-88434-minimal-example.stderr
+++ b/src/test/ui/borrowck/issue-88434-minimal-example.stderr
@@ -1,14 +1,14 @@
 error[E0080]: evaluation of constant value failed
-  --> $DIR/issue-88434-minimal-example.rs:10:5
+  --> $DIR/issue-88434-minimal-example.rs:9:5
    |
 LL | const _CONST: &() = &f(&|_| {});
-   |                      ---------- inside `_CONST` at $DIR/issue-88434-minimal-example.rs:4:22
+   |                      ---------- inside `_CONST` at $DIR/issue-88434-minimal-example.rs:3:22
 ...
 LL |     panic!()
    |     ^^^^^^^^
    |     |
-   |     the evaluated program panicked at 'explicit panic', $DIR/issue-88434-minimal-example.rs:10:5
-   |     inside `f::<[closure@$DIR/issue-88434-minimal-example.rs:4:25: 4:31]>` at $SRC_DIR/std/src/panic.rs:LL:COL
+   |     the evaluated program panicked at 'explicit panic', $DIR/issue-88434-minimal-example.rs:9:5
+   |     inside `f::<[closure@$DIR/issue-88434-minimal-example.rs:3:25: 3:31]>` at $SRC_DIR/std/src/panic.rs:LL:COL
    |
    = note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/src/test/ui/borrowck/issue-88434-removal-index-should-be-less.rs b/src/test/ui/borrowck/issue-88434-removal-index-should-be-less.rs
index 4db073c66b1f3..f0a6dcd4eb3b8 100644
--- a/src/test/ui/borrowck/issue-88434-removal-index-should-be-less.rs
+++ b/src/test/ui/borrowck/issue-88434-removal-index-should-be-less.rs
@@ -1,4 +1,3 @@
-#![feature(const_fn_trait_bound)]
 // Regression test for issue 88434
 
 const _CONST: &[u8] = &f(&[], |_| {});
diff --git a/src/test/ui/borrowck/issue-88434-removal-index-should-be-less.stderr b/src/test/ui/borrowck/issue-88434-removal-index-should-be-less.stderr
index 8cbb6a6340c7f..44e244ae9cc3f 100644
--- a/src/test/ui/borrowck/issue-88434-removal-index-should-be-less.stderr
+++ b/src/test/ui/borrowck/issue-88434-removal-index-should-be-less.stderr
@@ -1,14 +1,14 @@
 error[E0080]: evaluation of constant value failed
-  --> $DIR/issue-88434-removal-index-should-be-less.rs:10:5
+  --> $DIR/issue-88434-removal-index-should-be-less.rs:9:5
    |
 LL | const _CONST: &[u8] = &f(&[], |_| {});
-   |                        -------------- inside `_CONST` at $DIR/issue-88434-removal-index-should-be-less.rs:4:24
+   |                        -------------- inside `_CONST` at $DIR/issue-88434-removal-index-should-be-less.rs:3:24
 ...
 LL |     panic!()
    |     ^^^^^^^^
    |     |
-   |     the evaluated program panicked at 'explicit panic', $DIR/issue-88434-removal-index-should-be-less.rs:10:5
-   |     inside `f::<[closure@$DIR/issue-88434-removal-index-should-be-less.rs:4:31: 4:37]>` at $SRC_DIR/std/src/panic.rs:LL:COL
+   |     the evaluated program panicked at 'explicit panic', $DIR/issue-88434-removal-index-should-be-less.rs:9:5
+   |     inside `f::<[closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:37]>` at $SRC_DIR/std/src/panic.rs:LL:COL
    |
    = note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/src/test/ui/const-generics/generic_const_exprs/issue-85848.rs b/src/test/ui/const-generics/generic_const_exprs/issue-85848.rs
index 771e68b0db58a..e86ffbf10757e 100644
--- a/src/test/ui/const-generics/generic_const_exprs/issue-85848.rs
+++ b/src/test/ui/const-generics/generic_const_exprs/issue-85848.rs
@@ -1,4 +1,4 @@
-#![feature(const_fn_trait_bound, generic_const_exprs)]
+#![feature(generic_const_exprs)]
 #![allow(incomplete_features)]
 
 trait _Contains {
diff --git a/src/test/ui/const-generics/issues/issue-79674.rs b/src/test/ui/const-generics/issues/issue-79674.rs
index 2f196533dd88c..ff141d328e627 100644
--- a/src/test/ui/const-generics/issues/issue-79674.rs
+++ b/src/test/ui/const-generics/issues/issue-79674.rs
@@ -1,4 +1,4 @@
-#![feature(const_fn_trait_bound, generic_const_exprs)]
+#![feature(generic_const_exprs)]
 #![allow(incomplete_features)]
 
 trait MiniTypeId {
diff --git a/src/test/ui/consts/auxiliary/const_fn_lib.rs b/src/test/ui/consts/auxiliary/const_fn_lib.rs
index bf0b01a2ecfe0..88cea60e1b89e 100644
--- a/src/test/ui/consts/auxiliary/const_fn_lib.rs
+++ b/src/test/ui/consts/auxiliary/const_fn_lib.rs
@@ -1,6 +1,5 @@
 // Crate that exports a const fn. Used for testing cross-crate.
 
-#![feature(const_fn_fn_ptr_basics)]
 #![crate_type="rlib"]
 
 pub const fn foo() -> usize { 22 }
diff --git a/src/test/ui/consts/const-block-const-bound.rs b/src/test/ui/consts/const-block-const-bound.rs
index f3c82c5f96816..1ccd0ee937067 100644
--- a/src/test/ui/consts/const-block-const-bound.rs
+++ b/src/test/ui/consts/const-block-const-bound.rs
@@ -1,5 +1,5 @@
 #![allow(unused)]
-#![feature(const_fn_trait_bound, const_trait_impl, inline_const, negative_impls)]
+#![feature(const_trait_impl, inline_const, negative_impls)]
 
 const fn f(x: T) {}
 
diff --git a/src/test/ui/consts/const-eval/const_fn_ptr.stderr b/src/test/ui/consts/const-eval/const_fn_ptr.stderr
index a16ac7b2a24ee..ca1585f883759 100644
--- a/src/test/ui/consts/const-eval/const_fn_ptr.stderr
+++ b/src/test/ui/consts/const-eval/const_fn_ptr.stderr
@@ -10,23 +10,11 @@ help: skipping check that does not even have a feature gate
    |
 LL |     X_CONST(x)
    |     ^^^^^^^^^^
-help: skipping check for `const_fn_fn_ptr_basics` feature
-  --> $DIR/const_fn_ptr.rs:18:14
-   |
-LL | const fn foo(x: fn(usize) -> usize, y: usize)  -> usize {
-   |              ^
-help: skipping check for `const_fn_fn_ptr_basics` feature
-  --> $DIR/const_fn_ptr.rs:19:5
-   |
-LL |     x(y)
-   |     ^
 help: skipping check that does not even have a feature gate
   --> $DIR/const_fn_ptr.rs:19:5
    |
 LL |     x(y)
    |     ^^^^
 
-error: `-Zunleash-the-miri-inside-of-you` may not be used to circumvent feature gates, except when testing error paths in the CTFE engine
-
-error: aborting due to previous error; 1 warning emitted
+warning: 1 warning emitted
 
diff --git a/src/test/ui/consts/const-eval/const_fn_ptr_fail2.stderr b/src/test/ui/consts/const-eval/const_fn_ptr_fail2.stderr
index 4f7a771f4184f..c17166263ba09 100644
--- a/src/test/ui/consts/const-eval/const_fn_ptr_fail2.stderr
+++ b/src/test/ui/consts/const-eval/const_fn_ptr_fail2.stderr
@@ -12,16 +12,6 @@ LL |     assert_eq!(Z, 4);
 
 warning: skipping const checks
    |
-help: skipping check for `const_fn_fn_ptr_basics` feature
-  --> $DIR/const_fn_ptr_fail2.rs:11:14
-   |
-LL | const fn bar(x: fn(usize) -> usize, y: usize) -> usize {
-   |              ^
-help: skipping check for `const_fn_fn_ptr_basics` feature
-  --> $DIR/const_fn_ptr_fail2.rs:12:5
-   |
-LL |     x(y)
-   |     ^
 help: skipping check that does not even have a feature gate
   --> $DIR/const_fn_ptr_fail2.rs:12:5
    |
diff --git a/src/test/ui/consts/const-eval/issue-49296.rs b/src/test/ui/consts/const-eval/issue-49296.rs
index 80f6bbec2a181..917777a32fff3 100644
--- a/src/test/ui/consts/const-eval/issue-49296.rs
+++ b/src/test/ui/consts/const-eval/issue-49296.rs
@@ -1,7 +1,5 @@
 // issue-49296: Unsafe shenigans in constants can result in missing errors
 
-#![feature(const_fn_trait_bound)]
-
 use std::mem::transmute;
 
 const fn wat(x: u64) -> &'static u64 {
diff --git a/src/test/ui/consts/const-eval/issue-49296.stderr b/src/test/ui/consts/const-eval/issue-49296.stderr
index bc3074b10bee6..1864a28457910 100644
--- a/src/test/ui/consts/const-eval/issue-49296.stderr
+++ b/src/test/ui/consts/const-eval/issue-49296.stderr
@@ -1,5 +1,5 @@
 error[E0080]: evaluation of constant value failed
-  --> $DIR/issue-49296.rs:11:16
+  --> $DIR/issue-49296.rs:9:16
    |
 LL | const X: u64 = *wat(42);
    |                ^^^^^^^^ pointer to alloc2 was dereferenced after this allocation got freed
diff --git a/src/test/ui/consts/const-eval/issue-70804-fn-subtyping.rs b/src/test/ui/consts/const-eval/issue-70804-fn-subtyping.rs
index bf8bae5ea2c73..abd1d32abe289 100644
--- a/src/test/ui/consts/const-eval/issue-70804-fn-subtyping.rs
+++ b/src/test/ui/consts/const-eval/issue-70804-fn-subtyping.rs
@@ -1,5 +1,4 @@
 // check-pass
-#![feature(const_fn_fn_ptr_basics)]
 
 const fn nested(x: (for<'a> fn(&'a ()), String)) -> (fn(&'static ()), String) {
     x
diff --git a/src/test/ui/consts/const-extern-fn/const-extern-fn-min-const-fn.rs b/src/test/ui/consts/const-extern-fn/const-extern-fn-min-const-fn.rs
index 46748673067ce..c7078e46fa64f 100644
--- a/src/test/ui/consts/const-extern-fn/const-extern-fn-min-const-fn.rs
+++ b/src/test/ui/consts/const-extern-fn/const-extern-fn-min-const-fn.rs
@@ -2,8 +2,6 @@
 
 const extern "C" fn unsize(x: &[u8; 3]) -> &[u8] { x }
 const unsafe extern "C" fn closure() -> fn() { || {} }
-//~^ ERROR function pointer
-//~| ERROR function pointer cast
 const unsafe extern "C" fn use_float() { 1.0 + 1.0; }
 //~^ ERROR floating point arithmetic
 const extern "C" fn ptr_cast(val: *const u8) { val as usize; }
diff --git a/src/test/ui/consts/const-extern-fn/const-extern-fn-min-const-fn.stderr b/src/test/ui/consts/const-extern-fn/const-extern-fn-min-const-fn.stderr
index 2b2d23477f681..4bab466fb95a7 100644
--- a/src/test/ui/consts/const-extern-fn/const-extern-fn-min-const-fn.stderr
+++ b/src/test/ui/consts/const-extern-fn/const-extern-fn-min-const-fn.stderr
@@ -1,23 +1,5 @@
-error[E0658]: function pointers cannot appear in constant functions
-  --> $DIR/const-extern-fn-min-const-fn.rs:4:41
-   |
-LL | const unsafe extern "C" fn closure() -> fn() { || {} }
-   |                                         ^^^^
-   |
-   = note: see issue #57563  for more information
-   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
-
-error[E0658]: function pointer casts are not allowed in constant functions
-  --> $DIR/const-extern-fn-min-const-fn.rs:4:48
-   |
-LL | const unsafe extern "C" fn closure() -> fn() { || {} }
-   |                                                ^^^^^
-   |
-   = note: see issue #57563  for more information
-   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
-
 error[E0658]: floating point arithmetic is not allowed in constant functions
-  --> $DIR/const-extern-fn-min-const-fn.rs:7:42
+  --> $DIR/const-extern-fn-min-const-fn.rs:5:42
    |
 LL | const unsafe extern "C" fn use_float() { 1.0 + 1.0; }
    |                                          ^^^^^^^^^
@@ -26,7 +8,7 @@ LL | const unsafe extern "C" fn use_float() { 1.0 + 1.0; }
    = help: add `#![feature(const_fn_floating_point_arithmetic)]` to the crate attributes to enable
 
 error: pointers cannot be cast to integers during const eval
-  --> $DIR/const-extern-fn-min-const-fn.rs:9:48
+  --> $DIR/const-extern-fn-min-const-fn.rs:7:48
    |
 LL | const extern "C" fn ptr_cast(val: *const u8) { val as usize; }
    |                                                ^^^^^^^^^^^^
@@ -34,6 +16,6 @@ LL | const extern "C" fn ptr_cast(val: *const u8) { val as usize; }
    = note: at compile-time, pointers do not have an integer value
    = note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior
 
-error: aborting due to 4 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/consts/const-fn.rs b/src/test/ui/consts/const-fn.rs
index 1928c51885eff..59680e6e4a8e3 100644
--- a/src/test/ui/consts/const-fn.rs
+++ b/src/test/ui/consts/const-fn.rs
@@ -4,7 +4,6 @@
 // A very basic test of const fn functionality.
 
 #![feature(const_indexing)]
-#![feature(const_fn_trait_bound)]
 
 const fn add(x: u32, y: u32) -> u32 {
     x + y
diff --git a/src/test/ui/consts/const_fn_trait_bound.gated.stderr b/src/test/ui/consts/const_fn_trait_bound.gated.stderr
deleted file mode 100644
index ded05cb17c513..0000000000000
--- a/src/test/ui/consts/const_fn_trait_bound.gated.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: fatal error triggered by #[rustc_error]
-  --> $DIR/const_fn_trait_bound.rs:17:1
-   |
-LL | fn main() {}
-   | ^^^^^^^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/consts/const_fn_trait_bound.rs b/src/test/ui/consts/const_fn_trait_bound.rs
deleted file mode 100644
index 19c08b6214425..0000000000000
--- a/src/test/ui/consts/const_fn_trait_bound.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// gate-test-const_fn_trait_bound
-
-// revisions: stock gated
-
-#![feature(rustc_attrs)]
-#![cfg_attr(gated, feature(const_fn_trait_bound))]
-
-const fn test1() {}
-//[stock]~^ trait bounds
-const fn test2(_x: &dyn Send) {}
-//[stock]~^ trait objects in const fn are unstable
-const fn test3() -> &'static dyn Send { loop {} }
-//[stock]~^ trait objects in const fn are unstable
-
-
-#[rustc_error]
-fn main() {} //[gated]~ fatal error triggered by #[rustc_error]
diff --git a/src/test/ui/consts/const_fn_trait_bound.stock.stderr b/src/test/ui/consts/const_fn_trait_bound.stock.stderr
deleted file mode 100644
index 7d9e18cb341f3..0000000000000
--- a/src/test/ui/consts/const_fn_trait_bound.stock.stderr
+++ /dev/null
@@ -1,30 +0,0 @@
-error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
-  --> $DIR/const_fn_trait_bound.rs:8:16
-   |
-LL | const fn test1() {}
-   |                ^
-   |
-   = note: see issue #93706  for more information
-   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
-
-error[E0658]: trait objects in const fn are unstable
-  --> $DIR/const_fn_trait_bound.rs:10:16
-   |
-LL | const fn test2(_x: &dyn Send) {}
-   |                ^^
-   |
-   = note: see issue #93706  for more information
-   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
-
-error[E0658]: trait objects in const fn are unstable
-  --> $DIR/const_fn_trait_bound.rs:12:21
-   |
-LL | const fn test3() -> &'static dyn Send { loop {} }
-   |                     ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #93706  for more information
-   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/consts/issue-37550-1.rs b/src/test/ui/consts/issue-37550-1.rs
index 35b63bddca252..4d00ac7fd0d59 100644
--- a/src/test/ui/consts/issue-37550-1.rs
+++ b/src/test/ui/consts/issue-37550-1.rs
@@ -1,6 +1,8 @@
+// check-pass
+
 const fn x() {
     let t = true;
-    let x = || t; //~ ERROR function pointer
+    let x = || t;
 }
 
 fn main() {}
diff --git a/src/test/ui/consts/issue-37550-1.stderr b/src/test/ui/consts/issue-37550-1.stderr
deleted file mode 100644
index f66d706787039..0000000000000
--- a/src/test/ui/consts/issue-37550-1.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0658]: function pointers cannot appear in constant functions
-  --> $DIR/issue-37550-1.rs:3:9
-   |
-LL |     let x = || t;
-   |         ^
-   |
-   = note: see issue #57563  for more information
-   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/consts/issue-37550.rs b/src/test/ui/consts/issue-37550.rs
index 15877c53747ec..724eb28291ebc 100644
--- a/src/test/ui/consts/issue-37550.rs
+++ b/src/test/ui/consts/issue-37550.rs
@@ -2,8 +2,6 @@
 #![allow(dead_code)]
 #![allow(unused_variables)]
 
-#![feature(const_fn_fn_ptr_basics)]
-
 const fn x() {
     let t = true;
     let x = || t;
diff --git a/src/test/ui/consts/issue-46553.rs b/src/test/ui/consts/issue-46553.rs
index 0a1e835672de9..9438df1937bdd 100644
--- a/src/test/ui/consts/issue-46553.rs
+++ b/src/test/ui/consts/issue-46553.rs
@@ -1,5 +1,4 @@
 // run-pass
-#![feature(const_fn_fn_ptr_basics)]
 #![deny(const_err)]
 
 pub struct Data {
diff --git a/src/test/ui/consts/issue-56164.rs b/src/test/ui/consts/issue-56164.rs
index 9c673d20b2a95..22ac75514f624 100644
--- a/src/test/ui/consts/issue-56164.rs
+++ b/src/test/ui/consts/issue-56164.rs
@@ -1,5 +1,3 @@
-#![feature(const_fn_fn_ptr_basics)]
-
 const fn foo() { (||{})() }
 //~^ ERROR cannot call non-const closure
 
diff --git a/src/test/ui/consts/issue-56164.stderr b/src/test/ui/consts/issue-56164.stderr
index 62a7c7db6b83a..803424eedf32a 100644
--- a/src/test/ui/consts/issue-56164.stderr
+++ b/src/test/ui/consts/issue-56164.stderr
@@ -1,5 +1,5 @@
 error[E0015]: cannot call non-const closure in constant functions
-  --> $DIR/issue-56164.rs:3:18
+  --> $DIR/issue-56164.rs:1:18
    |
 LL | const fn foo() { (||{})() }
    |                  ^^^^^^^^
@@ -8,7 +8,7 @@ LL | const fn foo() { (||{})() }
    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
 
 error: function pointers are not allowed in const fn
-  --> $DIR/issue-56164.rs:7:5
+  --> $DIR/issue-56164.rs:5:5
    |
 LL |     input()
    |     ^^^^^^^
diff --git a/src/test/ui/consts/issue-88071.rs b/src/test/ui/consts/issue-88071.rs
index a2d4a642128b4..1c38c43e6c0c5 100644
--- a/src/test/ui/consts/issue-88071.rs
+++ b/src/test/ui/consts/issue-88071.rs
@@ -3,7 +3,6 @@
 // regression test for #88071
 
 #![feature(const_btree_new)]
-#![feature(const_fn_trait_bound)]
 
 use std::collections::BTreeMap;
 
diff --git a/src/test/ui/consts/min_const_fn/allow_const_fn_ptr.rs b/src/test/ui/consts/min_const_fn/allow_const_fn_ptr.rs
deleted file mode 100644
index a0870ea6de30b..0000000000000
--- a/src/test/ui/consts/min_const_fn/allow_const_fn_ptr.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-#![feature(rustc_attrs, staged_api, rustc_allow_const_fn_unstable)]
-#![feature(const_fn_fn_ptr_basics)]
-#![stable(feature = "rust1", since = "1.0.0")]
-
-#[stable(feature = "rust1", since = "1.0.0")]
-#[rustc_const_stable(since="1.0.0", feature = "mep")]
-const fn error(_: fn()) {}
-//~^ ERROR const-stable function cannot use `#[feature(const_fn_fn_ptr_basics)]`
-
-#[stable(feature = "rust1", since = "1.0.0")]
-#[rustc_const_stable(since="1.0.0", feature = "mep")]
-#[rustc_allow_const_fn_unstable(const_fn_fn_ptr_basics)]
-const fn compiles(_: fn()) {}
-
-fn main() {}
diff --git a/src/test/ui/consts/min_const_fn/allow_const_fn_ptr.stderr b/src/test/ui/consts/min_const_fn/allow_const_fn_ptr.stderr
deleted file mode 100644
index 3523cab49fd17..0000000000000
--- a/src/test/ui/consts/min_const_fn/allow_const_fn_ptr.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error: const-stable function cannot use `#[feature(const_fn_fn_ptr_basics)]`
-  --> $DIR/allow_const_fn_ptr.rs:7:16
-   |
-LL | const fn error(_: fn()) {}
-   |                ^
-   |
-help: if it is not part of the public API, make this function unstably const
-   |
-LL | #[rustc_const_unstable(feature = "...", issue = "...")]
-   |
-help: otherwise `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks
-   |
-LL | #[rustc_allow_const_fn_unstable(const_fn_fn_ptr_basics)]
-   |
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/consts/min_const_fn/allow_const_fn_ptr_run_pass.rs b/src/test/ui/consts/min_const_fn/allow_const_fn_ptr_run_pass.rs
index 430e911aacdee..2dbc424d3ba2d 100644
--- a/src/test/ui/consts/min_const_fn/allow_const_fn_ptr_run_pass.rs
+++ b/src/test/ui/consts/min_const_fn/allow_const_fn_ptr_run_pass.rs
@@ -1,13 +1,11 @@
 // run-pass
 #![feature(rustc_allow_const_fn_unstable)]
-#![feature(const_fn_fn_ptr_basics)]
 
 #![feature(rustc_attrs, staged_api)]
 #![stable(feature = "rust1", since = "1.0.0")]
 
 #[stable(feature = "rust1", since = "1.0.0")]
 #[rustc_const_stable(since="1.0.0", feature = "mep")]
-#[rustc_allow_const_fn_unstable(const_fn_fn_ptr_basics)]
 const fn takes_fn_ptr(_: fn()) {}
 
 const FN: fn() = || ();
diff --git a/src/test/ui/consts/min_const_fn/cast_errors.rs b/src/test/ui/consts/min_const_fn/cast_errors.rs
deleted file mode 100644
index b68f47f5cbcf1..0000000000000
--- a/src/test/ui/consts/min_const_fn/cast_errors.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-fn main() {}
-
-const fn unsize(x: &[u8; 3]) -> &[u8] { x }
-const fn closure() -> fn() { || {} }
-//~^ ERROR function pointer
-//~| ERROR function pointer cast
-const fn closure2() {
-    (|| {}) as fn();
-//~^ ERROR function pointer
-}
-const fn reify(f: fn()) -> unsafe fn() { f }
-//~^ ERROR function pointer
-//~| ERROR function pointer
-//~| ERROR function pointer cast
-const fn reify2() { main as unsafe fn(); }
-//~^ ERROR function pointer
-//~| ERROR function pointer cast
diff --git a/src/test/ui/consts/min_const_fn/cast_errors.stderr b/src/test/ui/consts/min_const_fn/cast_errors.stderr
deleted file mode 100644
index fb962bdf906c3..0000000000000
--- a/src/test/ui/consts/min_const_fn/cast_errors.stderr
+++ /dev/null
@@ -1,75 +0,0 @@
-error[E0658]: function pointers cannot appear in constant functions
-  --> $DIR/cast_errors.rs:4:23
-   |
-LL | const fn closure() -> fn() { || {} }
-   |                       ^^^^
-   |
-   = note: see issue #57563  for more information
-   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
-
-error[E0658]: function pointer casts are not allowed in constant functions
-  --> $DIR/cast_errors.rs:4:30
-   |
-LL | const fn closure() -> fn() { || {} }
-   |                              ^^^^^
-   |
-   = note: see issue #57563  for more information
-   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
-
-error[E0658]: function pointer casts are not allowed in constant functions
-  --> $DIR/cast_errors.rs:8:5
-   |
-LL |     (|| {}) as fn();
-   |     ^^^^^^^
-   |
-   = note: see issue #57563  for more information
-   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
-
-error[E0658]: function pointers cannot appear in constant functions
-  --> $DIR/cast_errors.rs:11:16
-   |
-LL | const fn reify(f: fn()) -> unsafe fn() { f }
-   |                ^
-   |
-   = note: see issue #57563  for more information
-   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
-
-error[E0658]: function pointers cannot appear in constant functions
-  --> $DIR/cast_errors.rs:11:28
-   |
-LL | const fn reify(f: fn()) -> unsafe fn() { f }
-   |                            ^^^^^^^^^^^
-   |
-   = note: see issue #57563  for more information
-   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
-
-error[E0658]: function pointer casts are not allowed in constant functions
-  --> $DIR/cast_errors.rs:11:42
-   |
-LL | const fn reify(f: fn()) -> unsafe fn() { f }
-   |                                          ^
-   |
-   = note: see issue #57563  for more information
-   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
-
-error[E0658]: function pointer casts are not allowed in constant functions
-  --> $DIR/cast_errors.rs:15:21
-   |
-LL | const fn reify2() { main as unsafe fn(); }
-   |                     ^^^^
-   |
-   = note: see issue #57563  for more information
-   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
-
-error[E0658]: function pointer casts are not allowed in constant functions
-  --> $DIR/cast_errors.rs:15:21
-   |
-LL | const fn reify2() { main as unsafe fn(); }
-   |                     ^^^^
-   |
-   = note: see issue #57563  for more information
-   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
-
-error: aborting due to 8 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/consts/min_const_fn/cast_fn.rs b/src/test/ui/consts/min_const_fn/cast_fn.rs
new file mode 100644
index 0000000000000..85802a51490f2
--- /dev/null
+++ b/src/test/ui/consts/min_const_fn/cast_fn.rs
@@ -0,0 +1,11 @@
+// check-pass
+
+fn main() {}
+
+const fn unsize(x: &[u8; 3]) -> &[u8] { x }
+const fn closure() -> fn() { || {} }
+const fn closure2() {
+    (|| {}) as fn();
+}
+const fn reify(f: fn()) -> unsafe fn() { f }
+const fn reify2() { main as unsafe fn(); }
diff --git a/src/test/ui/consts/min_const_fn/cmp_fn_pointers.rs b/src/test/ui/consts/min_const_fn/cmp_fn_pointers.rs
index 638ff1d8b9c1c..e07b269c386ea 100644
--- a/src/test/ui/consts/min_const_fn/cmp_fn_pointers.rs
+++ b/src/test/ui/consts/min_const_fn/cmp_fn_pointers.rs
@@ -1,6 +1,4 @@
 const fn cmp(x: fn(), y: fn()) -> bool {
-    //~^ ERROR function pointer
-    //~| ERROR function pointer
     unsafe { x == y }
     //~^ ERROR pointers cannot be reliably compared
 }
diff --git a/src/test/ui/consts/min_const_fn/cmp_fn_pointers.stderr b/src/test/ui/consts/min_const_fn/cmp_fn_pointers.stderr
index 5d8483cd111bf..3845068d8411c 100644
--- a/src/test/ui/consts/min_const_fn/cmp_fn_pointers.stderr
+++ b/src/test/ui/consts/min_const_fn/cmp_fn_pointers.stderr
@@ -1,29 +1,10 @@
-error[E0658]: function pointers cannot appear in constant functions
-  --> $DIR/cmp_fn_pointers.rs:1:14
-   |
-LL | const fn cmp(x: fn(), y: fn()) -> bool {
-   |              ^
-   |
-   = note: see issue #57563  for more information
-   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
-
-error[E0658]: function pointers cannot appear in constant functions
-  --> $DIR/cmp_fn_pointers.rs:1:23
-   |
-LL | const fn cmp(x: fn(), y: fn()) -> bool {
-   |                       ^
-   |
-   = note: see issue #57563  for more information
-   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
-
 error: pointers cannot be reliably compared during const eval
-  --> $DIR/cmp_fn_pointers.rs:4:14
+  --> $DIR/cmp_fn_pointers.rs:2:14
    |
 LL |     unsafe { x == y }
    |              ^^^^^^
    |
    = note: see issue #53020  for more information
 
-error: aborting due to 3 previous errors
+error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/consts/min_const_fn/min_const_fn.rs b/src/test/ui/consts/min_const_fn/min_const_fn.rs
index 10347a02074ec..0bafaf2e81f73 100644
--- a/src/test/ui/consts/min_const_fn/min_const_fn.rs
+++ b/src/test/ui/consts/min_const_fn/min_const_fn.rs
@@ -80,11 +80,10 @@ const unsafe fn ret_i32_no_unsafe() -> i32 { 42 }
 const unsafe fn ret_null_ptr_no_unsafe() -> *const T { core::ptr::null() }
 const unsafe fn ret_null_mut_ptr_no_unsafe() -> *mut T { core::ptr::null_mut() }
 
-// not ok
 const fn foo11(t: T) -> T { t }
-//~^ ERROR trait bounds other than `Sized` on const fn parameters are unstable
 const fn foo11_2(t: T) -> T { t }
-//~^ ERROR trait bounds other than `Sized` on const fn parameters are unstable
+
+// not ok
 
 static BAR: u32 = 42;
 const fn foo25() -> u32 { BAR } //~ ERROR cannot refer to statics
@@ -108,41 +107,28 @@ const fn foo37(a: bool, b: bool) -> bool { a || b }
 fn main() {}
 
 impl Foo {
-//~^ ERROR trait bounds other than `Sized` on const fn parameters are unstable
     const fn foo(&self) {}
 }
 
 impl Foo {
-//~^ ERROR trait bounds other than `Sized` on const fn parameters are unstable
     const fn foo2(&self) {}
 }
 
 impl Foo {
-//~^ ERROR trait bounds other than `Sized` on const fn parameters are unstable
     const fn foo3(&self) {}
 }
 
 struct AlanTuring(T);
 const fn no_apit2(_x: AlanTuring) {}
-//~^ ERROR trait bounds other than `Sized`
-//~| ERROR destructor
+//~^ ERROR destructor
 const fn no_apit(_x: impl std::fmt::Debug) {}
-//~^ ERROR trait bounds other than `Sized`
-//~| ERROR destructor
+//~^ ERROR destructor
 const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {}
-//~^ ERROR trait objects in const fn are unstable
 const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
-//~^ ERROR trait objects in const fn are unstable
 
 const fn no_unsafe() { unsafe {} }
 
-const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1 }
-//~^ ERROR trait objects in const fn are unstable
-//~| ERROR trait objects in const fn are unstable
-//~| ERROR trait objects in const fn are unstable
+const fn traits_are_ok_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1 }
 
-const fn no_fn_ptrs(_x: fn()) {}
-//~^ ERROR function pointer
-const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
-//~^ ERROR function pointer
-//~| ERROR function pointer cast
+const fn fn_ptrs(_x: fn()) {}
+const fn fn_ptrs2() -> fn() { fn foo() {} foo }
diff --git a/src/test/ui/consts/min_const_fn/min_const_fn.stderr b/src/test/ui/consts/min_const_fn/min_const_fn.stderr
index 67cb604b6a7be..4ad17602c8452 100644
--- a/src/test/ui/consts/min_const_fn/min_const_fn.stderr
+++ b/src/test/ui/consts/min_const_fn/min_const_fn.stderr
@@ -130,26 +130,8 @@ LL |     const fn get_mut_sq(&mut self) -> &mut T { &mut self.0 }
    = note: see issue #57349  for more information
    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
-error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
-  --> $DIR/min_const_fn.rs:84:16
-   |
-LL | const fn foo11(t: T) -> T { t }
-   |                ^
-   |
-   = note: see issue #93706  for more information
-   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
-
-error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
-  --> $DIR/min_const_fn.rs:86:18
-   |
-LL | const fn foo11_2(t: T) -> T { t }
-   |                  ^
-   |
-   = note: see issue #93706  for more information
-   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
-
 error[E0013]: constant functions cannot refer to statics
-  --> $DIR/min_const_fn.rs:90:27
+  --> $DIR/min_const_fn.rs:89:27
    |
 LL | const fn foo25() -> u32 { BAR }
    |                           ^^^
@@ -157,7 +139,7 @@ LL | const fn foo25() -> u32 { BAR }
    = help: consider extracting the value of the `static` to a `const`, and referring to that
 
 error[E0013]: constant functions cannot refer to statics
-  --> $DIR/min_const_fn.rs:91:37
+  --> $DIR/min_const_fn.rs:90:37
    |
 LL | const fn foo26() -> &'static u32 { &BAR }
    |                                     ^^^
@@ -165,7 +147,7 @@ LL | const fn foo26() -> &'static u32 { &BAR }
    = help: consider extracting the value of the `static` to a `const`, and referring to that
 
 error: pointers cannot be cast to integers during const eval
-  --> $DIR/min_const_fn.rs:92:42
+  --> $DIR/min_const_fn.rs:91:42
    |
 LL | const fn foo30(x: *const u32) -> usize { x as usize }
    |                                          ^^^^^^^^^^
@@ -174,7 +156,7 @@ LL | const fn foo30(x: *const u32) -> usize { x as usize }
    = note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior
 
 error: pointers cannot be cast to integers during const eval
-  --> $DIR/min_const_fn.rs:94:63
+  --> $DIR/min_const_fn.rs:93:63
    |
 LL | const fn foo30_with_unsafe(x: *const u32) -> usize { unsafe { x as usize } }
    |                                                               ^^^^^^^^^^
@@ -183,7 +165,7 @@ LL | const fn foo30_with_unsafe(x: *const u32) -> usize { unsafe { x as usize }
    = note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior
 
 error: pointers cannot be cast to integers during const eval
-  --> $DIR/min_const_fn.rs:96:42
+  --> $DIR/min_const_fn.rs:95:42
    |
 LL | const fn foo30_2(x: *mut u32) -> usize { x as usize }
    |                                          ^^^^^^^^^^
@@ -192,7 +174,7 @@ LL | const fn foo30_2(x: *mut u32) -> usize { x as usize }
    = note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior
 
 error: pointers cannot be cast to integers during const eval
-  --> $DIR/min_const_fn.rs:98:63
+  --> $DIR/min_const_fn.rs:97:63
    |
 LL | const fn foo30_2_with_unsafe(x: *mut u32) -> usize { unsafe { x as usize } }
    |                                                               ^^^^^^^^^^
@@ -201,7 +183,7 @@ LL | const fn foo30_2_with_unsafe(x: *mut u32) -> usize { unsafe { x as usize }
    = note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior
 
 error[E0658]: mutable references are not allowed in constant functions
-  --> $DIR/min_const_fn.rs:101:14
+  --> $DIR/min_const_fn.rs:100:14
    |
 LL | const fn inc(x: &mut i32) { *x += 1 }
    |              ^
@@ -209,155 +191,23 @@ LL | const fn inc(x: &mut i32) { *x += 1 }
    = note: see issue #57349  for more information
    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
-error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
-  --> $DIR/min_const_fn.rs:110:6
-   |
-LL | impl Foo {
-   |      ^
-LL |
-LL |     const fn foo(&self) {}
-   |     ------------------- function declared as const here
-   |
-   = note: see issue #93706  for more information
-   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
-
-error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
-  --> $DIR/min_const_fn.rs:115:6
-   |
-LL | impl Foo {
-   |      ^
-LL |
-LL |     const fn foo2(&self) {}
-   |     -------------------- function declared as const here
-   |
-   = note: see issue #93706  for more information
-   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
-
-error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
-  --> $DIR/min_const_fn.rs:120:6
-   |
-LL | impl Foo {
-   |      ^
-LL |
-LL |     const fn foo3(&self) {}
-   |     -------------------- function declared as const here
-   |
-   = note: see issue #93706  for more information
-   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
-
-error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
-  --> $DIR/min_const_fn.rs:126:34
-   |
-LL | const fn no_apit2(_x: AlanTuring) {}
-   |                                  ^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #93706  for more information
-   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
-
 error[E0493]: destructors cannot be evaluated at compile-time
-  --> $DIR/min_const_fn.rs:126:19
+  --> $DIR/min_const_fn.rs:122:19
    |
 LL | const fn no_apit2(_x: AlanTuring) {}
    |                   ^^                                     - value is dropped here
    |                   |
    |                   constant functions cannot evaluate destructors
 
-error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
-  --> $DIR/min_const_fn.rs:129:22
-   |
-LL | const fn no_apit(_x: impl std::fmt::Debug) {}
-   |                      ^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #93706  for more information
-   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
-
 error[E0493]: destructors cannot be evaluated at compile-time
-  --> $DIR/min_const_fn.rs:129:18
+  --> $DIR/min_const_fn.rs:124:18
    |
 LL | const fn no_apit(_x: impl std::fmt::Debug) {}
    |                  ^^                         - value is dropped here
    |                  |
    |                  constant functions cannot evaluate destructors
 
-error[E0658]: trait objects in const fn are unstable
-  --> $DIR/min_const_fn.rs:132:23
-   |
-LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {}
-   |                       ^^
-   |
-   = note: see issue #93706  for more information
-   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
-
-error[E0658]: trait objects in const fn are unstable
-  --> $DIR/min_const_fn.rs:134:32
-   |
-LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
-   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #93706  for more information
-   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
-
-error[E0658]: trait objects in const fn are unstable
-  --> $DIR/min_const_fn.rs:139:41
-   |
-LL | const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1 }
-   | -------------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   | |
-   | function declared as const here
-   |
-   = note: see issue #93706  for more information
-   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
-
-error[E0658]: trait objects in const fn are unstable
-  --> $DIR/min_const_fn.rs:139:42
-   |
-LL | const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1 }
-   | -------------------------------------    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   | |
-   | function declared as const here
-   |
-   = note: see issue #93706  for more information
-   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
-
-error[E0658]: trait objects in const fn are unstable
-  --> $DIR/min_const_fn.rs:139:42
-   |
-LL | const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1 }
-   | -------------------------------------    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   | |
-   | function declared as const here
-   |
-   = note: see issue #93706  for more information
-   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
-
-error[E0658]: function pointers cannot appear in constant functions
-  --> $DIR/min_const_fn.rs:144:21
-   |
-LL | const fn no_fn_ptrs(_x: fn()) {}
-   |                     ^^
-   |
-   = note: see issue #57563  for more information
-   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
-
-error[E0658]: function pointers cannot appear in constant functions
-  --> $DIR/min_const_fn.rs:146:27
-   |
-LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
-   |                           ^^^^
-   |
-   = note: see issue #57563  for more information
-   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
-
-error[E0658]: function pointer casts are not allowed in constant functions
-  --> $DIR/min_const_fn.rs:146:46
-   |
-LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
-   |                                              ^^^
-   |
-   = note: see issue #57563  for more information
-   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
-
-error: aborting due to 39 previous errors
+error: aborting due to 24 previous errors
 
 Some errors have detailed explanations: E0013, E0493, E0658.
 For more information about an error, try `rustc --explain E0013`.
diff --git a/src/test/ui/consts/min_const_fn/min_const_fn_dyn.rs b/src/test/ui/consts/min_const_fn/min_const_fn_dyn.rs
index 1ab8253b414a3..36c8880093ec3 100644
--- a/src/test/ui/consts/min_const_fn/min_const_fn_dyn.rs
+++ b/src/test/ui/consts/min_const_fn/min_const_fn_dyn.rs
@@ -1,3 +1,5 @@
+// check-pass
+
 struct HasDyn {
     field: &'static dyn std::fmt::Debug,
 }
@@ -7,9 +9,7 @@ struct Hide(HasDyn);
 const fn no_inner_dyn_trait(_x: Hide) {}
 const fn no_inner_dyn_trait2(x: Hide) {
     x.0.field;
-//~^ ERROR trait objects in const fn are unstable
 }
 const fn no_inner_dyn_trait_ret() -> Hide { Hide(HasDyn { field: &0 }) }
-//~^ ERROR trait objects in const fn are unstable
 
 fn main() {}
diff --git a/src/test/ui/consts/min_const_fn/min_const_fn_dyn.stderr b/src/test/ui/consts/min_const_fn/min_const_fn_dyn.stderr
deleted file mode 100644
index 4c2199101d302..0000000000000
--- a/src/test/ui/consts/min_const_fn/min_const_fn_dyn.stderr
+++ /dev/null
@@ -1,25 +0,0 @@
-error[E0658]: trait objects in const fn are unstable
-  --> $DIR/min_const_fn_dyn.rs:9:5
-   |
-LL | const fn no_inner_dyn_trait2(x: Hide) {
-   | ------------------------------------- function declared as const here
-LL |     x.0.field;
-   |     ^^^^^^^^^
-   |
-   = note: see issue #93706  for more information
-   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
-
-error[E0658]: trait objects in const fn are unstable
-  --> $DIR/min_const_fn_dyn.rs:12:66
-   |
-LL | const fn no_inner_dyn_trait_ret() -> Hide { Hide(HasDyn { field: &0 }) }
-   | -----------------------------------------                        ^^
-   | |
-   | function declared as const here
-   |
-   = note: see issue #93706  for more information
-   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/consts/min_const_fn/min_const_fn_fn_ptr.rs b/src/test/ui/consts/min_const_fn/min_const_fn_fn_ptr.rs
deleted file mode 100644
index bc6fe89222bbf..0000000000000
--- a/src/test/ui/consts/min_const_fn/min_const_fn_fn_ptr.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// gate-test-const_fn_fn_ptr_basics
-
-struct HasPtr {
-    field: fn(),
-}
-
-struct Hide(HasPtr);
-
-fn field() {}
-
-const fn no_inner_dyn_trait(_x: Hide) {}
-const fn no_inner_dyn_trait2(x: Hide) {
-    x.0.field;
-//~^ ERROR function pointer
-}
-const fn no_inner_dyn_trait_ret() -> Hide { Hide(HasPtr { field }) }
-//~^ ERROR function pointer
-
-fn main() {}
diff --git a/src/test/ui/consts/min_const_fn/min_const_fn_fn_ptr.stderr b/src/test/ui/consts/min_const_fn/min_const_fn_fn_ptr.stderr
deleted file mode 100644
index 8d82674bbf2d9..0000000000000
--- a/src/test/ui/consts/min_const_fn/min_const_fn_fn_ptr.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0658]: function pointers cannot appear in constant functions
-  --> $DIR/min_const_fn_fn_ptr.rs:13:5
-   |
-LL |     x.0.field;
-   |     ^^^^^^^^^
-   |
-   = note: see issue #57563  for more information
-   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
-
-error[E0658]: function pointer casts are not allowed in constant functions
-  --> $DIR/min_const_fn_fn_ptr.rs:16:59
-   |
-LL | const fn no_inner_dyn_trait_ret() -> Hide { Hide(HasPtr { field }) }
-   |                                                           ^^^^^
-   |
-   = note: see issue #57563  for more information
-   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/consts/miri_unleashed/abi-mismatch.stderr b/src/test/ui/consts/miri_unleashed/abi-mismatch.stderr
index e2f9708ddcb01..aaba19c2c8b0e 100644
--- a/src/test/ui/consts/miri_unleashed/abi-mismatch.stderr
+++ b/src/test/ui/consts/miri_unleashed/abi-mismatch.stderr
@@ -12,16 +12,6 @@ LL | static VAL: () = call_rust_fn(unsafe { std::mem::transmute(c_fn as extern "
 
 warning: skipping const checks
    |
-help: skipping check for `const_fn_fn_ptr_basics` feature
-  --> $DIR/abi-mismatch.rs:9:23
-   |
-LL | const fn call_rust_fn(my_fn: extern "Rust" fn()) {
-   |                       ^^^^^
-help: skipping check for `const_fn_fn_ptr_basics` feature
-  --> $DIR/abi-mismatch.rs:10:5
-   |
-LL |     my_fn();
-   |     ^^^^^
 help: skipping check that does not even have a feature gate
   --> $DIR/abi-mismatch.rs:10:5
    |
diff --git a/src/test/ui/consts/unstable-const-fn-in-libcore.rs b/src/test/ui/consts/unstable-const-fn-in-libcore.rs
index 8ee1270805e27..16b36c8d56d8d 100644
--- a/src/test/ui/consts/unstable-const-fn-in-libcore.rs
+++ b/src/test/ui/consts/unstable-const-fn-in-libcore.rs
@@ -5,7 +5,6 @@
 
 #![stable(feature = "core", since = "1.6.0")]
 #![feature(staged_api)]
-#![feature(const_fn_trait_bound)]
 
 enum Opt {
     Some(T),
diff --git a/src/test/ui/nll/issue-55825-const-fn.rs b/src/test/ui/nll/issue-55825-const-fn.rs
index c9efccd15b7c5..17c4a0496b6d8 100644
--- a/src/test/ui/nll/issue-55825-const-fn.rs
+++ b/src/test/ui/nll/issue-55825-const-fn.rs
@@ -1,8 +1,10 @@
 // Regression test for issue #55825
 // Tests that we don't emit a spurious warning in NLL mode
 
+// check-pass
+
 #![feature(nll)]
 
-const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() } //~ ERROR const
+const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
 
 fn main() { }
diff --git a/src/test/ui/nll/issue-55825-const-fn.stderr b/src/test/ui/nll/issue-55825-const-fn.stderr
deleted file mode 100644
index c834f8bd9c4f5..0000000000000
--- a/src/test/ui/nll/issue-55825-const-fn.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0658]: trait objects in const fn are unstable
-  --> $DIR/issue-55825-const-fn.rs:6:32
-   |
-LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
-   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #93706  for more information
-   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/rfc-2091-track-caller/caller-location-fnptr-rt-ctfe-equiv.stderr b/src/test/ui/rfc-2091-track-caller/caller-location-fnptr-rt-ctfe-equiv.stderr
index 0291a52633358..cf8ca57714c29 100644
--- a/src/test/ui/rfc-2091-track-caller/caller-location-fnptr-rt-ctfe-equiv.stderr
+++ b/src/test/ui/rfc-2091-track-caller/caller-location-fnptr-rt-ctfe-equiv.stderr
@@ -1,27 +1,10 @@
 warning: skipping const checks
    |
-help: skipping check for `const_fn_fn_ptr_basics` feature
-  --> $DIR/caller-location-fnptr-rt-ctfe-equiv.rs:20:9
-   |
-LL |     let ptr: fn() -> L = attributed;
-   |         ^^^
-help: skipping check for `const_fn_fn_ptr_basics` feature
-  --> $DIR/caller-location-fnptr-rt-ctfe-equiv.rs:21:5
-   |
-LL |     ptr()
-   |     ^^^
-help: skipping check for `const_fn_fn_ptr_basics` feature
-  --> $DIR/caller-location-fnptr-rt-ctfe-equiv.rs:20:26
-   |
-LL |     let ptr: fn() -> L = attributed;
-   |                          ^^^^^^^^^^
 help: skipping check that does not even have a feature gate
   --> $DIR/caller-location-fnptr-rt-ctfe-equiv.rs:21:5
    |
 LL |     ptr()
    |     ^^^^^
 
-error: `-Zunleash-the-miri-inside-of-you` may not be used to circumvent feature gates, except when testing error paths in the CTFE engine
-
-error: aborting due to previous error; 1 warning emitted
+warning: 1 warning emitted
 
diff --git a/src/test/ui/rfc-2632-const-trait-impl/auxiliary/cross-crate.rs b/src/test/ui/rfc-2632-const-trait-impl/auxiliary/cross-crate.rs
index 2d049277d7fcf..34934d1e01dbd 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/auxiliary/cross-crate.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/auxiliary/cross-crate.rs
@@ -1,4 +1,3 @@
-#![feature(const_fn_trait_bound)]
 #![feature(const_trait_impl)]
 
 pub trait MyTrait {
diff --git a/src/test/ui/rfc-2632-const-trait-impl/call-generic-in-impl.rs b/src/test/ui/rfc-2632-const-trait-impl/call-generic-in-impl.rs
index 4b706a190e65e..89dc47aad3dd7 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/call-generic-in-impl.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/call-generic-in-impl.rs
@@ -1,5 +1,4 @@
 // check-pass
-#![feature(const_fn_trait_bound)]
 #![feature(const_trait_impl)]
 
 trait MyPartialEq {
diff --git a/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-chain.rs b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-chain.rs
index adf8d4f9ea565..b00ff1f2fac2a 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-chain.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-chain.rs
@@ -3,7 +3,6 @@
 // check-pass
 
 #![feature(const_trait_impl)]
-#![feature(const_fn_trait_bound)]
 
 struct S;
 
diff --git a/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs
index cc24dbd96d253..c8ded0fa7ea32 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs
@@ -1,7 +1,6 @@
 // check-pass
 
 #![feature(const_trait_impl)]
-#![feature(const_fn_trait_bound)]
 
 struct S;
 
diff --git a/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-fail.rs b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-fail.rs
index e81e0d1e571c3..8df68225d44cd 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-fail.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-fail.rs
@@ -1,4 +1,3 @@
-#![feature(const_fn_trait_bound)]
 #![feature(const_trait_impl)]
 
 pub const fn equals_self(t: &T) -> bool {
diff --git a/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-fail.stderr b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-fail.stderr
index 3963f64ad32b3..cf114334cc391 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-fail.stderr
+++ b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-fail.stderr
@@ -1,17 +1,17 @@
 error[E0277]: can't compare `T` with `T` in const contexts
-  --> $DIR/call-generic-method-fail.rs:5:5
+  --> $DIR/call-generic-method-fail.rs:4:5
    |
 LL |     *t == *t
    |     ^^^^^^^^ no implementation for `T == T`
    |
 note: the trait `PartialEq` is implemented for `T`, but that implementation is not `const`
-  --> $DIR/call-generic-method-fail.rs:5:5
+  --> $DIR/call-generic-method-fail.rs:4:5
    |
 LL |     *t == *t
    |     ^^^^^^^^
 
 error[E0015]: cannot call non-const operator in constant functions
-  --> $DIR/call-generic-method-fail.rs:5:5
+  --> $DIR/call-generic-method-fail.rs:4:5
    |
 LL |     *t == *t
    |     ^^^^^^^^
diff --git a/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst-bound.rs b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst-bound.rs
index 585b65988f390..e197c8b73c535 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst-bound.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst-bound.rs
@@ -1,7 +1,5 @@
 // check-pass
 
-#![feature(const_fn_trait_bound)]
-
 struct S;
 
 impl PartialEq for S {
diff --git a/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst.rs b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst.rs
index 6881db0aa02c3..d3e14a53a2fc3 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst.rs
@@ -1,5 +1,4 @@
 #![feature(const_trait_impl)]
-#![feature(const_fn_trait_bound)]
 
 struct S;
 
diff --git a/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr
index 35b7fe8e401c3..b0af45acda1ed 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr
+++ b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr
@@ -1,5 +1,5 @@
 error[E0277]: can't compare `S` with `S` in const contexts
-  --> $DIR/call-generic-method-nonconst.rs:19:34
+  --> $DIR/call-generic-method-nonconst.rs:18:34
    |
 LL | pub const EQ: bool = equals_self(&S);
    |                      ----------- ^^ no implementation for `S == S`
@@ -8,12 +8,12 @@ LL | pub const EQ: bool = equals_self(&S);
    |
    = help: the trait `~const PartialEq` is not implemented for `S`
 note: the trait `PartialEq` is implemented for `S`, but that implementation is not `const`
-  --> $DIR/call-generic-method-nonconst.rs:19:34
+  --> $DIR/call-generic-method-nonconst.rs:18:34
    |
 LL | pub const EQ: bool = equals_self(&S);
    |                                  ^^
 note: required by a bound in `equals_self`
-  --> $DIR/call-generic-method-nonconst.rs:12:25
+  --> $DIR/call-generic-method-nonconst.rs:11:25
    |
 LL | const fn equals_self(t: &T) -> bool {
    |                         ^^^^^^^^^^^^^^^^ required by this bound in `equals_self`
diff --git a/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-pass.rs b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-pass.rs
index aa9bd4d824e17..40565d1b76a9c 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-pass.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-pass.rs
@@ -3,7 +3,6 @@
 // check-pass
 
 #![feature(const_trait_impl)]
-#![feature(const_fn_trait_bound)]
 
 struct S;
 
diff --git a/src/test/ui/rfc-2632-const-trait-impl/const-closures.rs b/src/test/ui/rfc-2632-const-trait-impl/const-closures.rs
index 99e608797ff65..755d853983949 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/const-closures.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/const-closures.rs
@@ -1,7 +1,6 @@
 // run-pass
 
 #![feature(const_trait_impl)]
-#![feature(const_fn_trait_bound)]
 
 const fn answer_p1(f: &F) -> u8
     where
diff --git a/src/test/ui/rfc-2632-const-trait-impl/const-default-method-bodies.rs b/src/test/ui/rfc-2632-const-trait-impl/const-default-method-bodies.rs
index 3e87787a09195..3c82fe1ad6c77 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/const-default-method-bodies.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/const-default-method-bodies.rs
@@ -1,5 +1,4 @@
 #![feature(const_trait_impl)]
-#![feature(const_fn_trait_bound)] // FIXME is this needed?
 
 trait ConstDefaultFn: Sized {
     fn b(self);
diff --git a/src/test/ui/rfc-2632-const-trait-impl/const-default-method-bodies.stderr b/src/test/ui/rfc-2632-const-trait-impl/const-default-method-bodies.stderr
index 948830d6def58..fe788b43a5416 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/const-default-method-bodies.stderr
+++ b/src/test/ui/rfc-2632-const-trait-impl/const-default-method-bodies.stderr
@@ -1,17 +1,17 @@
 error[E0277]: the trait bound `NonConstImpl: ~const ConstDefaultFn` is not satisfied
-  --> $DIR/const-default-method-bodies.rs:25:18
+  --> $DIR/const-default-method-bodies.rs:24:18
    |
 LL |     NonConstImpl.a();
    |                  ^^^ the trait `~const ConstDefaultFn` is not implemented for `NonConstImpl`
    |
 note: the trait `ConstDefaultFn` is implemented for `NonConstImpl`, but that implementation is not `const`
-  --> $DIR/const-default-method-bodies.rs:25:18
+  --> $DIR/const-default-method-bodies.rs:24:18
    |
 LL |     NonConstImpl.a();
    |                  ^^^
 
 error[E0015]: cannot call non-const fn `::a` in constant functions
-  --> $DIR/const-default-method-bodies.rs:25:18
+  --> $DIR/const-default-method-bodies.rs:24:18
    |
 LL |     NonConstImpl.a();
    |                  ^^^
diff --git a/src/test/ui/rfc-2632-const-trait-impl/const-drop-bound.rs b/src/test/ui/rfc-2632-const-trait-impl/const-drop-bound.rs
index 83fa32bf092bb..a1cfee6b6e782 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/const-drop-bound.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/const-drop-bound.rs
@@ -1,7 +1,6 @@
 // check-pass
 
 #![feature(const_trait_impl)]
-#![feature(const_fn_trait_bound)]
 #![feature(const_precise_live_drops)]
 
 const fn foo(res: Result) -> Option where E: ~const Drop {
diff --git a/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr b/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr
index d280cd2556f06..d88bcdc89ad2b 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr
+++ b/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `NonTrivialDrop: ~const Drop` is not satisfied
-  --> $DIR/const-drop-fail.rs:44:5
+  --> $DIR/const-drop-fail.rs:43:5
    |
 LL |         const _: () = check($exp);
    |                       ----- required by a bound introduced by this call
@@ -8,7 +8,7 @@ LL |     NonTrivialDrop,
    |     ^^^^^^^^^^^^^^ expected an implementor of trait `~const Drop`
    |
 note: required by a bound in `check`
-  --> $DIR/const-drop-fail.rs:35:19
+  --> $DIR/const-drop-fail.rs:34:19
    |
 LL | const fn check(_: T) {}
    |                   ^^^^^^^^^^^ required by this bound in `check`
@@ -20,7 +20,7 @@ LL |     &mut NonTrivialDrop,
    |     ++++
 
 error[E0277]: the trait bound `NonTrivialDrop: ~const Drop` is not satisfied in `ConstImplWithDropGlue`
-  --> $DIR/const-drop-fail.rs:46:5
+  --> $DIR/const-drop-fail.rs:45:5
    |
 LL |         const _: () = check($exp);
    |                       ----- required by a bound introduced by this call
@@ -29,23 +29,23 @@ LL |     ConstImplWithDropGlue(NonTrivialDrop),
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `ConstImplWithDropGlue`, the trait `~const Drop` is not implemented for `NonTrivialDrop`
    |
 note: the trait `Drop` is implemented for `NonTrivialDrop`, but that implementation is not `const`
-  --> $DIR/const-drop-fail.rs:46:5
+  --> $DIR/const-drop-fail.rs:45:5
    |
 LL |     ConstImplWithDropGlue(NonTrivialDrop),
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 note: required because it appears within the type `ConstImplWithDropGlue`
-  --> $DIR/const-drop-fail.rs:17:8
+  --> $DIR/const-drop-fail.rs:16:8
    |
 LL | struct ConstImplWithDropGlue(NonTrivialDrop);
    |        ^^^^^^^^^^^^^^^^^^^^^
 note: required by a bound in `check`
-  --> $DIR/const-drop-fail.rs:35:19
+  --> $DIR/const-drop-fail.rs:34:19
    |
 LL | const fn check(_: T) {}
    |                   ^^^^^^^^^^^ required by this bound in `check`
 
 error[E0277]: the trait bound `ConstDropImplWithBounds: ~const Drop` is not satisfied
-  --> $DIR/const-drop-fail.rs:48:5
+  --> $DIR/const-drop-fail.rs:47:5
    |
 LL |         const _: () = check($exp);
    |                       ----- required by a bound introduced by this call
@@ -54,12 +54,12 @@ LL |     ConstDropImplWithBounds::(PhantomData),
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an implementor of trait `~const Drop`
    |
 note: required because of the requirements on the impl of `~const Drop` for `ConstDropImplWithBounds`
-  --> $DIR/const-drop-fail.rs:29:25
+  --> $DIR/const-drop-fail.rs:28:25
    |
 LL | impl const Drop for ConstDropImplWithBounds {
    |                         ^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^
 note: required by a bound in `check`
-  --> $DIR/const-drop-fail.rs:35:19
+  --> $DIR/const-drop-fail.rs:34:19
    |
 LL | const fn check(_: T) {}
    |                   ^^^^^^^^^^^ required by this bound in `check`
diff --git a/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.rs b/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.rs
index 4622723c1891e..49968b47dbeb0 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.rs
@@ -1,7 +1,6 @@
 // revisions: stock precise
 #![feature(const_trait_impl)]
 #![feature(const_mut_refs)]
-#![feature(const_fn_trait_bound)]
 #![cfg_attr(precise, feature(const_precise_live_drops))]
 
 use std::marker::PhantomData;
diff --git a/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.stock.stderr b/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.stock.stderr
index d280cd2556f06..d88bcdc89ad2b 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.stock.stderr
+++ b/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.stock.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `NonTrivialDrop: ~const Drop` is not satisfied
-  --> $DIR/const-drop-fail.rs:44:5
+  --> $DIR/const-drop-fail.rs:43:5
    |
 LL |         const _: () = check($exp);
    |                       ----- required by a bound introduced by this call
@@ -8,7 +8,7 @@ LL |     NonTrivialDrop,
    |     ^^^^^^^^^^^^^^ expected an implementor of trait `~const Drop`
    |
 note: required by a bound in `check`
-  --> $DIR/const-drop-fail.rs:35:19
+  --> $DIR/const-drop-fail.rs:34:19
    |
 LL | const fn check(_: T) {}
    |                   ^^^^^^^^^^^ required by this bound in `check`
@@ -20,7 +20,7 @@ LL |     &mut NonTrivialDrop,
    |     ++++
 
 error[E0277]: the trait bound `NonTrivialDrop: ~const Drop` is not satisfied in `ConstImplWithDropGlue`
-  --> $DIR/const-drop-fail.rs:46:5
+  --> $DIR/const-drop-fail.rs:45:5
    |
 LL |         const _: () = check($exp);
    |                       ----- required by a bound introduced by this call
@@ -29,23 +29,23 @@ LL |     ConstImplWithDropGlue(NonTrivialDrop),
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `ConstImplWithDropGlue`, the trait `~const Drop` is not implemented for `NonTrivialDrop`
    |
 note: the trait `Drop` is implemented for `NonTrivialDrop`, but that implementation is not `const`
-  --> $DIR/const-drop-fail.rs:46:5
+  --> $DIR/const-drop-fail.rs:45:5
    |
 LL |     ConstImplWithDropGlue(NonTrivialDrop),
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 note: required because it appears within the type `ConstImplWithDropGlue`
-  --> $DIR/const-drop-fail.rs:17:8
+  --> $DIR/const-drop-fail.rs:16:8
    |
 LL | struct ConstImplWithDropGlue(NonTrivialDrop);
    |        ^^^^^^^^^^^^^^^^^^^^^
 note: required by a bound in `check`
-  --> $DIR/const-drop-fail.rs:35:19
+  --> $DIR/const-drop-fail.rs:34:19
    |
 LL | const fn check(_: T) {}
    |                   ^^^^^^^^^^^ required by this bound in `check`
 
 error[E0277]: the trait bound `ConstDropImplWithBounds: ~const Drop` is not satisfied
-  --> $DIR/const-drop-fail.rs:48:5
+  --> $DIR/const-drop-fail.rs:47:5
    |
 LL |         const _: () = check($exp);
    |                       ----- required by a bound introduced by this call
@@ -54,12 +54,12 @@ LL |     ConstDropImplWithBounds::(PhantomData),
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an implementor of trait `~const Drop`
    |
 note: required because of the requirements on the impl of `~const Drop` for `ConstDropImplWithBounds`
-  --> $DIR/const-drop-fail.rs:29:25
+  --> $DIR/const-drop-fail.rs:28:25
    |
 LL | impl const Drop for ConstDropImplWithBounds {
    |                         ^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^
 note: required by a bound in `check`
-  --> $DIR/const-drop-fail.rs:35:19
+  --> $DIR/const-drop-fail.rs:34:19
    |
 LL | const fn check(_: T) {}
    |                   ^^^^^^^^^^^ required by this bound in `check`
diff --git a/src/test/ui/rfc-2632-const-trait-impl/const-drop.rs b/src/test/ui/rfc-2632-const-trait-impl/const-drop.rs
index 13363c506d54e..20b9d7721472c 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/const-drop.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/const-drop.rs
@@ -1,7 +1,6 @@
 // run-pass
 // revisions: stock precise
 #![feature(const_trait_impl)]
-#![feature(const_fn_trait_bound)]
 #![feature(const_mut_refs)]
 #![feature(never_type)]
 #![cfg_attr(precise, feature(const_precise_live_drops))]
diff --git a/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs b/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs
index 76ea17159ac79..17c88e442961e 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs
@@ -1,4 +1,3 @@
-#![feature(const_fn_trait_bound)]
 #![feature(const_trait_impl)]
 
 trait Tr {}
diff --git a/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.stderr b/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.stderr
index bc807507fd668..668e166c29897 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.stderr
+++ b/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.stderr
@@ -1,16 +1,16 @@
 error[E0277]: the trait bound `(): ~const Tr` is not satisfied
-  --> $DIR/default-method-body-is-const-body-checking.rs:12:15
+  --> $DIR/default-method-body-is-const-body-checking.rs:11:15
    |
 LL |         foo::<()>();
    |               ^^ the trait `~const Tr` is not implemented for `()`
    |
 note: the trait `Tr` is implemented for `()`, but that implementation is not `const`
-  --> $DIR/default-method-body-is-const-body-checking.rs:12:15
+  --> $DIR/default-method-body-is-const-body-checking.rs:11:15
    |
 LL |         foo::<()>();
    |               ^^
 note: required by a bound in `foo`
-  --> $DIR/default-method-body-is-const-body-checking.rs:7:28
+  --> $DIR/default-method-body-is-const-body-checking.rs:6:28
    |
 LL | const fn foo() where T: ~const Tr {}
    |                            ^^^^^^^^^ required by this bound in `foo`
diff --git a/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.rs b/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.rs
index 4d087b5180be4..be2f3f6d6231e 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.rs
@@ -1,4 +1,3 @@
-#![feature(const_fn_trait_bound)]
 #![feature(const_trait_impl)]
 
 pub trait Tr {
diff --git a/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.stderr b/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.stderr
index db4d61f88ab2f..cf357971951df 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.stderr
+++ b/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.stderr
@@ -1,17 +1,17 @@
 error[E0277]: the trait bound `(): ~const Tr` is not satisfied
-  --> $DIR/default-method-body-is-const-same-trait-ck.rs:10:12
+  --> $DIR/default-method-body-is-const-same-trait-ck.rs:9:12
    |
 LL |         ().a()
    |            ^^^ the trait `~const Tr` is not implemented for `()`
    |
 note: the trait `Tr` is implemented for `()`, but that implementation is not `const`
-  --> $DIR/default-method-body-is-const-same-trait-ck.rs:10:12
+  --> $DIR/default-method-body-is-const-same-trait-ck.rs:9:12
    |
 LL |         ().a()
    |            ^^^
 
 error[E0015]: cannot call non-const fn `<() as Tr>::a` in constant functions
-  --> $DIR/default-method-body-is-const-same-trait-ck.rs:10:12
+  --> $DIR/default-method-body-is-const-same-trait-ck.rs:9:12
    |
 LL |         ().a()
    |            ^^^
diff --git a/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.rs b/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.rs
index d5b1a9073acea..7f6d86d337582 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.rs
@@ -7,7 +7,6 @@
 
 #![feature(staged_api)]
 #![feature(const_trait_impl)]
-#![feature(const_fn_trait_bound)]
 #![stable(since = "1", feature = "foo")]
 
 trait Tr {
diff --git a/src/test/ui/rfc-2632-const-trait-impl/generic-bound.rs b/src/test/ui/rfc-2632-const-trait-impl/generic-bound.rs
index 91c3d2d5920bc..5495b531cff56 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/generic-bound.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/generic-bound.rs
@@ -1,7 +1,6 @@
 // run-pass
 
 #![feature(const_trait_impl)]
-#![feature(const_fn_trait_bound)]
 
 use std::marker::PhantomData;
 
diff --git a/src/test/ui/rfc-2632-const-trait-impl/impl-with-default-fn-fail.rs b/src/test/ui/rfc-2632-const-trait-impl/impl-with-default-fn-fail.rs
index 8eefb375b8c1b..eba8b665ceb0e 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/impl-with-default-fn-fail.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/impl-with-default-fn-fail.rs
@@ -1,5 +1,4 @@
 #![feature(const_trait_impl)]
-#![feature(const_fn_trait_bound)]
 
 trait Tr {
     fn req(&self);
diff --git a/src/test/ui/rfc-2632-const-trait-impl/impl-with-default-fn-fail.stderr b/src/test/ui/rfc-2632-const-trait-impl/impl-with-default-fn-fail.stderr
index a091679704111..4ec6f929ffcd9 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/impl-with-default-fn-fail.stderr
+++ b/src/test/ui/rfc-2632-const-trait-impl/impl-with-default-fn-fail.stderr
@@ -1,5 +1,5 @@
 error: const trait implementations may not use non-const default functions
-  --> $DIR/impl-with-default-fn-fail.rs:18:1
+  --> $DIR/impl-with-default-fn-fail.rs:17:1
    |
 LL | / impl const Tr for S {
 LL | |     fn req(&self) {}
@@ -9,7 +9,7 @@ LL | | }
    = note: `prov` not implemented
 
 error: const trait implementations may not use non-const default functions
-  --> $DIR/impl-with-default-fn-fail.rs:28:1
+  --> $DIR/impl-with-default-fn-fail.rs:27:1
    |
 LL | / impl const Tr for u32 {
 LL | |     fn req(&self) {}
@@ -20,7 +20,7 @@ LL | | }
    = note: `prov` not implemented
 
 error[E0046]: not all trait items implemented, missing: `req`
-  --> $DIR/impl-with-default-fn-fail.rs:22:1
+  --> $DIR/impl-with-default-fn-fail.rs:21:1
    |
 LL |     fn req(&self);
    |     -------------- `req` from trait
diff --git a/src/test/ui/rfc-2632-const-trait-impl/impl-with-default-fn-pass.rs b/src/test/ui/rfc-2632-const-trait-impl/impl-with-default-fn-pass.rs
index ba3fec0882b02..2e4664714a70a 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/impl-with-default-fn-pass.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/impl-with-default-fn-pass.rs
@@ -1,7 +1,6 @@
 // check-pass
 
 #![feature(const_trait_impl)]
-#![feature(const_fn_trait_bound)]
 
 trait Tr {
     fn req(&self);
diff --git a/src/test/ui/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs b/src/test/ui/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs
index fe1015b3bf7ee..2cef803a90e07 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs
@@ -1,6 +1,5 @@
 // check-pass
 #![feature(const_trait_impl)]
-#![feature(const_fn_trait_bound)]
 
 struct S;
 
diff --git a/src/test/ui/rfc-2632-const-trait-impl/issue-88155.rs b/src/test/ui/rfc-2632-const-trait-impl/issue-88155.rs
index cbe3fe0ce5f3f..b132c395ac7b4 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/issue-88155.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/issue-88155.rs
@@ -1,4 +1,3 @@
-#![feature(const_fn_trait_bound)]
 #![feature(const_trait_impl)]
 
 pub trait A {
diff --git a/src/test/ui/rfc-2632-const-trait-impl/issue-88155.stderr b/src/test/ui/rfc-2632-const-trait-impl/issue-88155.stderr
index 931c0b3658fd9..955923505200a 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/issue-88155.stderr
+++ b/src/test/ui/rfc-2632-const-trait-impl/issue-88155.stderr
@@ -1,17 +1,17 @@
 error[E0277]: the trait bound `T: ~const A` is not satisfied
-  --> $DIR/issue-88155.rs:9:5
+  --> $DIR/issue-88155.rs:8:5
    |
 LL |     T::assoc()
    |     ^^^^^^^^^^ the trait `~const A` is not implemented for `T`
    |
 note: the trait `A` is implemented for `T`, but that implementation is not `const`
-  --> $DIR/issue-88155.rs:9:5
+  --> $DIR/issue-88155.rs:8:5
    |
 LL |     T::assoc()
    |     ^^^^^^^^^^
 
 error[E0015]: cannot call non-const fn `::assoc` in constant functions
-  --> $DIR/issue-88155.rs:9:5
+  --> $DIR/issue-88155.rs:8:5
    |
 LL |     T::assoc()
    |     ^^^^^^^^^^
diff --git a/src/test/ui/rfc-2632-const-trait-impl/issue-92111.rs b/src/test/ui/rfc-2632-const-trait-impl/issue-92111.rs
index 9bf0886084f91..da7147acdd7e9 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/issue-92111.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/issue-92111.rs
@@ -10,7 +10,6 @@
 // check-pass
 
 #![feature(const_trait_impl)]
-#![feature(const_fn_trait_bound)]
 
 pub trait Tr {}
 
diff --git a/src/test/ui/rfc-2632-const-trait-impl/issue-92230-wf-super-trait-env.rs b/src/test/ui/rfc-2632-const-trait-impl/issue-92230-wf-super-trait-env.rs
index 158c628c3e0cb..97c27ce1a1cfa 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/issue-92230-wf-super-trait-env.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/issue-92230-wf-super-trait-env.rs
@@ -2,7 +2,6 @@
 //
 // check-pass
 
-#![feature(const_fn_trait_bound)]
 #![feature(const_trait_impl)]
 
 pub trait Super {}
diff --git a/src/test/ui/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.rs b/src/test/ui/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.rs
index ef74ef8e42620..defef9e04098e 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.rs
@@ -1,7 +1,6 @@
 // check-pass
 
 #![feature(const_trait_impl)]
-#![feature(const_fn_trait_bound)]
 
 trait Convert {
     fn to(self) -> T;
diff --git a/src/test/ui/rfc-2632-const-trait-impl/trait-default-body-stability.rs b/src/test/ui/rfc-2632-const-trait-impl/trait-default-body-stability.rs
index cbfdf89b7bd19..f4a5d0133ce89 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/trait-default-body-stability.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/trait-default-body-stability.rs
@@ -2,7 +2,6 @@
 
 #![feature(staged_api)]
 #![feature(const_trait_impl)]
-#![feature(const_fn_trait_bound)]
 #![feature(const_t_try)]
 #![feature(const_try)]
 #![feature(try_trait_v2)]
diff --git a/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause-run.rs b/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause-run.rs
index 0cde5b6f84218..e47c5c7bd6665 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause-run.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause-run.rs
@@ -1,7 +1,6 @@
 // run-pass
 
 #![feature(const_trait_impl)]
-#![feature(const_fn_trait_bound)]
 
 trait Bar {
     fn bar() -> u8;
diff --git a/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause-self-referential.rs b/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause-self-referential.rs
index ae9ab26cdc04a..acea58eaecb9a 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause-self-referential.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause-self-referential.rs
@@ -1,7 +1,6 @@
 // check-pass
 
 #![feature(const_trait_impl)]
-#![feature(const_fn_trait_bound)]
 
 trait Foo {
     fn bar() where Self: ~const Foo;
diff --git a/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause.rs b/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause.rs
index d64822d7ce8af..d37ed3bb8dd9a 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause.rs
@@ -1,4 +1,3 @@
-#![feature(const_fn_trait_bound)]
 #![feature(const_trait_impl)]
 
 trait Bar {}
diff --git a/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause.stderr b/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause.stderr
index f9b5d81c63b85..d5b2d26973096 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause.stderr
+++ b/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause.stderr
@@ -1,16 +1,16 @@
 error[E0277]: the trait bound `T: ~const Bar` is not satisfied
-  --> $DIR/trait-where-clause.rs:14:5
+  --> $DIR/trait-where-clause.rs:13:5
    |
 LL |     T::b();
    |     ^^^^ the trait `~const Bar` is not implemented for `T`
    |
 note: the trait `Bar` is implemented for `T`, but that implementation is not `const`
-  --> $DIR/trait-where-clause.rs:14:5
+  --> $DIR/trait-where-clause.rs:13:5
    |
 LL |     T::b();
    |     ^^^^
 note: required by a bound in `Foo::b`
-  --> $DIR/trait-where-clause.rs:8:24
+  --> $DIR/trait-where-clause.rs:7:24
    |
 LL |     fn b() where Self: ~const Bar;
    |                        ^^^^^^^^^^ required by this bound in `Foo::b`
@@ -20,18 +20,18 @@ LL | const fn test1() {
    |                                    ++++++++++++
 
 error[E0277]: the trait bound `T: ~const Bar` is not satisfied
-  --> $DIR/trait-where-clause.rs:16:5
+  --> $DIR/trait-where-clause.rs:15:5
    |
 LL |     T::c::();
    |     ^^^^^^^^^ the trait `~const Bar` is not implemented for `T`
    |
 note: the trait `Bar` is implemented for `T`, but that implementation is not `const`
-  --> $DIR/trait-where-clause.rs:16:5
+  --> $DIR/trait-where-clause.rs:15:5
    |
 LL |     T::c::();
    |     ^^^^^^^^^
 note: required by a bound in `Foo::c`
-  --> $DIR/trait-where-clause.rs:9:13
+  --> $DIR/trait-where-clause.rs:8:13
    |
 LL |     fn c();
    |             ^^^^^^^^^^ required by this bound in `Foo::c`
@@ -41,13 +41,13 @@ LL | const fn test1() {
    |                                    ++++++++++++
 
 error[E0277]: the trait bound `T: Bar` is not satisfied
-  --> $DIR/trait-where-clause.rs:28:5
+  --> $DIR/trait-where-clause.rs:27:5
    |
 LL |     T::b();
    |     ^^^^ the trait `Bar` is not implemented for `T`
    |
 note: required by a bound in `Foo::b`
-  --> $DIR/trait-where-clause.rs:8:24
+  --> $DIR/trait-where-clause.rs:7:24
    |
 LL |     fn b() where Self: ~const Bar;
    |                        ^^^^^^^^^^ required by this bound in `Foo::b`
@@ -57,13 +57,13 @@ LL | fn test3() {
    |                 +++++
 
 error[E0277]: the trait bound `T: Bar` is not satisfied
-  --> $DIR/trait-where-clause.rs:30:5
+  --> $DIR/trait-where-clause.rs:29:5
    |
 LL |     T::c::();
    |     ^^^^^^^^^ the trait `Bar` is not implemented for `T`
    |
 note: required by a bound in `Foo::c`
-  --> $DIR/trait-where-clause.rs:9:13
+  --> $DIR/trait-where-clause.rs:8:13
    |
 LL |     fn c();
    |             ^^^^^^^^^^ required by this bound in `Foo::c`
diff --git a/src/test/ui/type-alias-impl-trait/issue-53096.rs b/src/test/ui/type-alias-impl-trait/issue-53096.rs
index 792bd16527be8..757c3e8e59c09 100644
--- a/src/test/ui/type-alias-impl-trait/issue-53096.rs
+++ b/src/test/ui/type-alias-impl-trait/issue-53096.rs
@@ -1,4 +1,4 @@
-#![feature(const_impl_trait, const_fn_fn_ptr_basics, rustc_attrs)]
+#![feature(const_impl_trait, rustc_attrs)]
 #![feature(type_alias_impl_trait)]
 
 type Foo = impl Fn() -> usize;

From 8e93a48c32852b09f4270348883b61edba5bb068 Mon Sep 17 00:00:00 2001
From: Eric Holk 
Date: Thu, 10 Feb 2022 19:23:43 -0800
Subject: [PATCH 07/11] Update and fix clippy tests

---
 .../clippy_lints/src/missing_const_for_fn.rs       | 13 +++++++++++++
 .../ui/missing_const_for_fn/could_be_const.rs      |  2 --
 .../ui/missing_const_for_fn/could_be_const.stderr  | 14 +++++++++++---
 3 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/src/tools/clippy/clippy_lints/src/missing_const_for_fn.rs b/src/tools/clippy/clippy_lints/src/missing_const_for_fn.rs
index bad9e0be82e61..ecc9acf4445d0 100644
--- a/src/tools/clippy/clippy_lints/src/missing_const_for_fn.rs
+++ b/src/tools/clippy/clippy_lints/src/missing_const_for_fn.rs
@@ -3,6 +3,7 @@ use clippy_utils::qualify_min_const_fn::is_min_const_fn;
 use clippy_utils::ty::has_drop;
 use clippy_utils::{fn_has_unsatisfiable_preds, is_entrypoint_fn, meets_msrv, msrvs, trait_ref_of_method};
 use rustc_hir as hir;
+use rustc_hir::def_id::CRATE_DEF_ID;
 use rustc_hir::intravisit::FnKind;
 use rustc_hir::{Body, Constness, FnDecl, GenericParamKind, HirId};
 use rustc_lint::{LateContext, LateLintPass};
@@ -131,6 +132,18 @@ impl<'tcx> LateLintPass<'tcx> for MissingConstForFn {
             FnKind::Closure => return,
         }
 
+        // Const fns are not allowed as methods in a trait.
+        {
+            let parent = cx.tcx.hir().get_parent_item(hir_id);
+            if parent != CRATE_DEF_ID {
+                if let hir::Node::Item(item) = cx.tcx.hir().get_by_def_id(parent) {
+                    if let hir::ItemKind::Trait(..) = &item.kind {
+                        return;
+                    }
+                }
+            }
+        }
+
         let mir = cx.tcx.optimized_mir(def_id);
 
         if let Err((span, err)) = is_min_const_fn(cx.tcx, mir, self.msrv.as_ref()) {
diff --git a/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.rs b/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.rs
index baa7eec05462e..88f6935d224ae 100644
--- a/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.rs
+++ b/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.rs
@@ -49,8 +49,6 @@ fn sub(x: u32) -> usize {
     unsafe { transmute(&x) }
 }
 
-// NOTE: This is currently not yet allowed to be const
-// Once implemented, Clippy should be able to suggest this as const, too.
 fn generic_arr(t: [T; 1]) -> T {
     t[0]
 }
diff --git a/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.stderr b/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.stderr
index b89cc6451bb59..3eb52b6827475 100644
--- a/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.stderr
+++ b/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.stderr
@@ -58,7 +58,15 @@ LL | | }
    | |_^
 
 error: this could be a `const fn`
-  --> $DIR/could_be_const.rs:67:9
+  --> $DIR/could_be_const.rs:52:1
+   |
+LL | / fn generic_arr(t: [T; 1]) -> T {
+LL | |     t[0]
+LL | | }
+   | |_^
+
+error: this could be a `const fn`
+  --> $DIR/could_be_const.rs:65:9
    |
 LL | /         pub fn b(self, a: &A) -> B {
 LL | |             B
@@ -66,12 +74,12 @@ LL | |         }
    | |_________^
 
 error: this could be a `const fn`
-  --> $DIR/could_be_const.rs:77:5
+  --> $DIR/could_be_const.rs:75:5
    |
 LL | /     fn const_fn_stabilized_before_msrv(byte: u8) {
 LL | |         byte.is_ascii_digit();
 LL | |     }
    | |_____^
 
-error: aborting due to 9 previous errors
+error: aborting due to 10 previous errors
 

From 801be21d11806d37bacd7c7adaeb93a33871f31e Mon Sep 17 00:00:00 2001
From: Eric Holk 
Date: Fri, 11 Feb 2022 11:36:02 -0800
Subject: [PATCH 08/11] Remove dead/useless code

---
 .../src/transform/check_consts/check.rs       | 36 -------------------
 .../src/transform/check_consts/ops.rs         | 22 ------------
 2 files changed, 58 deletions(-)

diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
index fc53f2785ca0c..3b255de6314aa 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
@@ -230,8 +230,6 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
                 }
             }
 
-            self.check_item_predicates();
-
             for (idx, local) in body.local_decls.iter_enumerated() {
                 // Handle the return place below.
                 if idx == RETURN_PLACE || local.internal {
@@ -364,40 +362,6 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
         }
     }
 
-    fn check_item_predicates(&mut self) {
-        let ConstCx { tcx, .. } = *self.ccx;
-
-        let mut current = self.def_id().to_def_id();
-        loop {
-            let predicates = tcx.predicates_of(current);
-            for (predicate, _) in predicates.predicates {
-                match predicate.kind().skip_binder() {
-                    ty::PredicateKind::RegionOutlives(_)
-                    | ty::PredicateKind::TypeOutlives(_)
-                    | ty::PredicateKind::WellFormed(_)
-                    | ty::PredicateKind::Projection(_)
-                    | ty::PredicateKind::ConstEvaluatable(..)
-                    | ty::PredicateKind::ConstEquate(..)
-                    | ty::PredicateKind::Trait(..)
-                    | ty::PredicateKind::TypeWellFormedFromEnv(..) => continue,
-                    ty::PredicateKind::ObjectSafe(_) => {
-                        bug!("object safe predicate on function: {:#?}", predicate)
-                    }
-                    ty::PredicateKind::ClosureKind(..) => {
-                        bug!("closure kind predicate on function: {:#?}", predicate)
-                    }
-                    ty::PredicateKind::Subtype(_) | ty::PredicateKind::Coerce(_) => {
-                        bug!("subtype/coerce predicate on function: {:#?}", predicate)
-                    }
-                }
-            }
-            match predicates.parent {
-                Some(parent) => current = parent,
-                None => break,
-            }
-        }
-    }
-
     fn check_mut_borrow(&mut self, local: Local, kind: hir::BorrowKind) {
         match self.const_kind() {
             // In a const fn all borrows are transient or point to the places given via
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
index 00c28fef5d2ab..0f5bcabeb846b 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
@@ -816,26 +816,4 @@ pub mod ty {
             )
         }
     }
-
-    /// A trait bound with the `?const Trait` opt-out
-    #[derive(Debug)]
-    pub struct TraitBoundNotConst;
-    impl<'tcx> NonConstOp<'tcx> for TraitBoundNotConst {
-        fn status_in_item(&self, _: &ConstCx<'_, 'tcx>) -> Status {
-            Status::Unstable(sym::const_trait_bound_opt_out)
-        }
-
-        fn build_error(
-            &self,
-            ccx: &ConstCx<'_, 'tcx>,
-            span: Span,
-        ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> {
-            feature_err(
-                &ccx.tcx.sess.parse_sess,
-                sym::const_trait_bound_opt_out,
-                span,
-                "`?const Trait` syntax is unstable",
-            )
-        }
-    }
 }

From 8700b45b67b2cc138718a17fdb606db0944d03aa Mon Sep 17 00:00:00 2001
From: Eric Holk 
Date: Fri, 11 Feb 2022 18:04:44 -0800
Subject: [PATCH 09/11] Stabilize const_impl_trait as well

---
 .../src/transform/check_consts/check.rs       |  1 -
 .../src/transform/check_consts/ops.rs         | 21 -------------------
 compiler/rustc_feature/src/accepted.rs        |  2 ++
 compiler/rustc_feature/src/active.rs          |  2 --
 library/core/src/lib.rs                       |  2 +-
 .../min_const_fn/min_const_fn_impl_trait.rs   | 10 ---------
 .../min_const_fn_impl_trait.stderr            | 21 -------------------
 .../ui/type-alias-impl-trait/issue-53096.rs   |  2 +-
 .../issue-53678-generator-and-const-fn.rs     |  2 +-
 9 files changed, 5 insertions(+), 58 deletions(-)
 delete mode 100644 src/test/ui/consts/min_const_fn/min_const_fn_impl_trait.rs
 delete mode 100644 src/test/ui/consts/min_const_fn/min_const_fn_impl_trait.stderr

diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
index 3b255de6314aa..7dc279cc840fb 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
@@ -356,7 +356,6 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
 
             match *ty.kind() {
                 ty::Ref(_, _, hir::Mutability::Mut) => self.check_op(ops::ty::MutRef(kind)),
-                ty::Opaque(..) => self.check_op(ops::ty::ImplTrait),
                 _ => {}
             }
         }
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
index 0f5bcabeb846b..ba248a3b6cbe5 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
@@ -795,25 +795,4 @@ pub mod ty {
             )
         }
     }
-
-    #[derive(Debug)]
-    pub struct ImplTrait;
-    impl<'tcx> NonConstOp<'tcx> for ImplTrait {
-        fn status_in_item(&self, _: &ConstCx<'_, '_>) -> Status {
-            Status::Unstable(sym::const_impl_trait)
-        }
-
-        fn build_error(
-            &self,
-            ccx: &ConstCx<'_, 'tcx>,
-            span: Span,
-        ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> {
-            feature_err(
-                &ccx.tcx.sess.parse_sess,
-                sym::const_impl_trait,
-                span,
-                &format!("`impl Trait` is not allowed in {}s", ccx.const_kind()),
-            )
-        }
-    }
 }
diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs
index b649a548750ad..3fa11a6cd6325 100644
--- a/compiler/rustc_feature/src/accepted.rs
+++ b/compiler/rustc_feature/src/accepted.rs
@@ -100,6 +100,8 @@ declare_features! (
     (accepted, const_generics_defaults, "1.59.0", Some(44580), None),
     /// Allows the use of `if` and `match` in constants.
     (accepted, const_if_match, "1.46.0", Some(49146), None),
+    /// Allows argument and return position `impl Trait` in a `const fn`.
+    (accepted, const_impl_trait, "1.60.0", Some(77463), None),
     /// Allows indexing into constant arrays.
     (accepted, const_indexing, "1.26.0", Some(29947), None),
     /// Allows let bindings, assignments and destructuring in `const` functions and constants.
diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs
index e48039148d9e3..a69d28b184aed 100644
--- a/compiler/rustc_feature/src/active.rs
+++ b/compiler/rustc_feature/src/active.rs
@@ -340,8 +340,6 @@ declare_features! (
     (active, const_fn_floating_point_arithmetic, "1.48.0", Some(57241), None),
     /// Allows `for _ in _` loops in const contexts.
     (active, const_for, "1.56.0", Some(87575), None),
-    /// Allows argument and return position `impl Trait` in a `const fn`.
-    (active, const_impl_trait, "1.48.0", Some(77463), None),
     /// Allows using `&mut` in constant functions.
     (active, const_mut_refs, "1.41.0", Some(57349), None),
     /// Be more precise when looking for live drops in a const context.
diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs
index d337592d5f03a..f436afbee448e 100644
--- a/library/core/src/lib.rs
+++ b/library/core/src/lib.rs
@@ -160,7 +160,7 @@
 #![feature(const_fn_floating_point_arithmetic)]
 #![cfg_attr(bootstrap, feature(const_fn_fn_ptr_basics))]
 #![cfg_attr(bootstrap, feature(const_fn_trait_bound))]
-#![feature(const_impl_trait)]
+#![cfg_attr(bootstrap, feature(const_impl_trait))]
 #![feature(const_mut_refs)]
 #![feature(const_precise_live_drops)]
 #![feature(const_refs_to_cell)]
diff --git a/src/test/ui/consts/min_const_fn/min_const_fn_impl_trait.rs b/src/test/ui/consts/min_const_fn/min_const_fn_impl_trait.rs
deleted file mode 100644
index e062c9f0aa38c..0000000000000
--- a/src/test/ui/consts/min_const_fn/min_const_fn_impl_trait.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// gate-test-const_impl_trait
-
-struct AlanTuring(T);
-const fn no_rpit2() -> AlanTuring { //~ `impl Trait`
-    AlanTuring(0)
-}
-
-const fn no_rpit() -> impl std::fmt::Debug {} //~ `impl Trait`
-
-fn main() {}
diff --git a/src/test/ui/consts/min_const_fn/min_const_fn_impl_trait.stderr b/src/test/ui/consts/min_const_fn/min_const_fn_impl_trait.stderr
deleted file mode 100644
index 01c797cd96b4d..0000000000000
--- a/src/test/ui/consts/min_const_fn/min_const_fn_impl_trait.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0658]: `impl Trait` is not allowed in constant functions
-  --> $DIR/min_const_fn_impl_trait.rs:4:24
-   |
-LL | const fn no_rpit2() -> AlanTuring {
-   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #77463  for more information
-   = help: add `#![feature(const_impl_trait)]` to the crate attributes to enable
-
-error[E0658]: `impl Trait` is not allowed in constant functions
-  --> $DIR/min_const_fn_impl_trait.rs:8:23
-   |
-LL | const fn no_rpit() -> impl std::fmt::Debug {}
-   |                       ^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #77463  for more information
-   = help: add `#![feature(const_impl_trait)]` to the crate attributes to enable
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/type-alias-impl-trait/issue-53096.rs b/src/test/ui/type-alias-impl-trait/issue-53096.rs
index 757c3e8e59c09..007dcf3bcb680 100644
--- a/src/test/ui/type-alias-impl-trait/issue-53096.rs
+++ b/src/test/ui/type-alias-impl-trait/issue-53096.rs
@@ -1,4 +1,4 @@
-#![feature(const_impl_trait, rustc_attrs)]
+#![feature(rustc_attrs)]
 #![feature(type_alias_impl_trait)]
 
 type Foo = impl Fn() -> usize;
diff --git a/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs b/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs
index 176118200e5ed..a3f126d56cf20 100644
--- a/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs
+++ b/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs
@@ -1,4 +1,4 @@
-#![feature(const_impl_trait, generators, generator_trait, rustc_attrs)]
+#![feature(generators, generator_trait, rustc_attrs)]
 #![feature(type_alias_impl_trait)]
 
 use std::ops::Generator;

From 1afbf3e4b1cbe1eb466da3da2319770db8ff5e9d Mon Sep 17 00:00:00 2001
From: Eric Holk 
Date: Fri, 25 Feb 2022 16:17:25 -0800
Subject: [PATCH 10/11] Bump stabilization version to 1.61.0

---
 compiler/rustc_feature/src/accepted.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs
index 3fa11a6cd6325..fc2ac75d60967 100644
--- a/compiler/rustc_feature/src/accepted.rs
+++ b/compiler/rustc_feature/src/accepted.rs
@@ -87,9 +87,9 @@ declare_features! (
     /// Allows calling constructor functions in `const fn`.
     (accepted, const_constructor, "1.40.0", Some(61456), None),
     /// Allows using and casting function pointers in a `const fn`.
-    (accepted, const_fn_fn_ptr_basics, "1.60.0", Some(57563), None),
+    (accepted, const_fn_fn_ptr_basics, "1.61.0", Some(57563), None),
     /// Allows trait bounds in `const fn`.
-    (accepted, const_fn_trait_bound, "1.60.0", Some(93706), None),
+    (accepted, const_fn_trait_bound, "1.61.0", Some(93706), None),
     /// Allows calling `transmute` in const fn
     (accepted, const_fn_transmute, "1.56.0", Some(53605), None),
     /// Allows accessing fields of unions inside `const` functions.
@@ -101,7 +101,7 @@ declare_features! (
     /// Allows the use of `if` and `match` in constants.
     (accepted, const_if_match, "1.46.0", Some(49146), None),
     /// Allows argument and return position `impl Trait` in a `const fn`.
-    (accepted, const_impl_trait, "1.60.0", Some(77463), None),
+    (accepted, const_impl_trait, "1.61.0", Some(77463), None),
     /// Allows indexing into constant arrays.
     (accepted, const_indexing, "1.26.0", Some(29947), None),
     /// Allows let bindings, assignments and destructuring in `const` functions and constants.

From bb6bcaa1deaa0102ffb9fd23e27f427939de43a1 Mon Sep 17 00:00:00 2001
From: Eric Holk 
Date: Fri, 4 Mar 2022 11:29:57 -0800
Subject: [PATCH 11/11] Update tests

---
 src/test/ui/consts/unstable-const-fn-in-libcore.stderr      | 6 +++---
 .../ui/type-alias-impl-trait/structural-match-no-leak.rs    | 1 -
 .../type-alias-impl-trait/structural-match-no-leak.stderr   | 2 +-
 src/test/ui/type-alias-impl-trait/structural-match.rs       | 1 -
 src/test/ui/type-alias-impl-trait/structural-match.stderr   | 2 +-
 5 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/test/ui/consts/unstable-const-fn-in-libcore.stderr b/src/test/ui/consts/unstable-const-fn-in-libcore.stderr
index 3ec9971b8e1e8..180f9f10cc6bc 100644
--- a/src/test/ui/consts/unstable-const-fn-in-libcore.stderr
+++ b/src/test/ui/consts/unstable-const-fn-in-libcore.stderr
@@ -1,5 +1,5 @@
 error[E0015]: cannot call non-const closure in constant functions
-  --> $DIR/unstable-const-fn-in-libcore.rs:23:26
+  --> $DIR/unstable-const-fn-in-libcore.rs:22:26
    |
 LL |             Opt::None => f(),
    |                          ^^^
@@ -11,7 +11,7 @@ LL |     const fn unwrap_or_else T + ~const std::ops::FnOnce<()>>
    |                                              +++++++++++++++++++++++++++++
 
 error[E0493]: destructors cannot be evaluated at compile-time
-  --> $DIR/unstable-const-fn-in-libcore.rs:18:53
+  --> $DIR/unstable-const-fn-in-libcore.rs:17:53
    |
 LL |     const fn unwrap_or_else T>(self, f: F) -> T {
    |                                                     ^ constant functions cannot evaluate destructors
@@ -20,7 +20,7 @@ LL |     }
    |     - value is dropped here
 
 error[E0493]: destructors cannot be evaluated at compile-time
-  --> $DIR/unstable-const-fn-in-libcore.rs:18:47
+  --> $DIR/unstable-const-fn-in-libcore.rs:17:47
    |
 LL |     const fn unwrap_or_else T>(self, f: F) -> T {
    |                                               ^^^^ constant functions cannot evaluate destructors
diff --git a/src/test/ui/type-alias-impl-trait/structural-match-no-leak.rs b/src/test/ui/type-alias-impl-trait/structural-match-no-leak.rs
index 51a7b6454c35e..219837aa04bab 100644
--- a/src/test/ui/type-alias-impl-trait/structural-match-no-leak.rs
+++ b/src/test/ui/type-alias-impl-trait/structural-match-no-leak.rs
@@ -1,4 +1,3 @@
-#![feature(const_impl_trait)]
 #![feature(type_alias_impl_trait)]
 
 type Bar = impl Send;
diff --git a/src/test/ui/type-alias-impl-trait/structural-match-no-leak.stderr b/src/test/ui/type-alias-impl-trait/structural-match-no-leak.stderr
index 7e41b374452a3..889c4fd4b0405 100644
--- a/src/test/ui/type-alias-impl-trait/structural-match-no-leak.stderr
+++ b/src/test/ui/type-alias-impl-trait/structural-match-no-leak.stderr
@@ -1,5 +1,5 @@
 error: `impl Send` cannot be used in patterns
-  --> $DIR/structural-match-no-leak.rs:15:9
+  --> $DIR/structural-match-no-leak.rs:14:9
    |
 LL |         LEAK_FREE => (),
    |         ^^^^^^^^^
diff --git a/src/test/ui/type-alias-impl-trait/structural-match.rs b/src/test/ui/type-alias-impl-trait/structural-match.rs
index 73558d39ad561..c9e669cad603a 100644
--- a/src/test/ui/type-alias-impl-trait/structural-match.rs
+++ b/src/test/ui/type-alias-impl-trait/structural-match.rs
@@ -1,4 +1,3 @@
-#![feature(const_impl_trait)]
 #![feature(type_alias_impl_trait)]
 
 type Foo = impl Send;
diff --git a/src/test/ui/type-alias-impl-trait/structural-match.stderr b/src/test/ui/type-alias-impl-trait/structural-match.stderr
index b43f2148dea5e..262fd0726137e 100644
--- a/src/test/ui/type-alias-impl-trait/structural-match.stderr
+++ b/src/test/ui/type-alias-impl-trait/structural-match.stderr
@@ -1,5 +1,5 @@
 error: `impl Send` cannot be used in patterns
-  --> $DIR/structural-match.rs:16:9
+  --> $DIR/structural-match.rs:15:9
    |
 LL |         VALUE => (),
    |         ^^^^^