- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.
Description
With #84310, the const-checking analysis in compiler/rustc_mir/src/transform/check_consts no longer cares about the const_fn feature gate. So it's time we remove it entirely. That, however, turns out to be non-trivial -- I tried.
- Some external creates need to be patched first to not use const_fnany more:
error[E0557]: feature has been removed
  --> /cargo/registry/src/github.com-1ecc6299db9ec823/lock_api-0.4.1/src/lib.rs:91:42
   |
91 | #![cfg_attr(feature = "nightly", feature(const_fn))]
   |                                          ^^^^^^^^ feature has been removed
   |
   = note: replaced by finer-grained feature flags
- Something very strange is going on with the "const fn in trait" errors. In my attempt I made this a new feature gate, which however just lead to tons of duplicate errors.
- Something else but equally strange is going on with some cases of having trait bounds on const fn, leading to errors disappearing in themin_const_fntest.
Cc @rust-lang/wg-const-eval
Metadata
Metadata
Assignees
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.