Skip to content

make rustc_allow_const_fn_unstable an actual rustc_attrs attribute#152749

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
cyrgani:rustc-allow-const
Feb 18, 2026
Merged

make rustc_allow_const_fn_unstable an actual rustc_attrs attribute#152749
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
cyrgani:rustc-allow-const

Conversation

@cyrgani
Copy link
Contributor

@cyrgani cyrgani commented Feb 17, 2026

It is already named like one, but used to have its own feature gate, which this PR now removes in favor of just using #![feature(rustc_attrs)].

Most of the diff is just the line number changes in malformed-attrs.stderr.

@rustbot
Copy link
Collaborator

rustbot commented Feb 17, 2026

⚠️ #[rustc_allow_const_fn_unstable] needs careful audit to avoid accidentally exposing unstable
implementation details on stable.

cc @rust-lang/wg-const-eval

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Feb 17, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 17, 2026

r? @mati865

rustbot has assigned @mati865.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 68 candidates
  • Random selection from 14 candidates

@rust-log-analyzer

This comment has been minimized.

Some("removed in favor of `#![register_tool]`"), 66070),
(removed, rust_2018_preview, "1.76.0", None,
Some("2018 Edition preview is no longer relevant")),
(removed, rustc_allow_const_fn_unstable, "CURRENT_RUSTC_VERSION", Some(69399), Some("merged into `#![feature(rustc_attrs)]`")),
Copy link
Member

@fmease fmease Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there's actual merit in keeping track of removed internal features 🤔. After all, in theory nobody other than stdlib authors should've used and should use this attribute. Context: I'm always eager to get rid of unnecessary baggage.

(#69399 isn't even a proper tracking issue ^^).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree with fmease here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed it.
That said, I was told to do the opposite in #152746 (comment) earlier today.

Copy link
Member

@fmease fmease Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for bringing this up. As a general rule, we indeed want to keep track of removed features, so users have an easier time migrating. Of course, there are probably gray areas where the opinion of reviewers might diverge.

In the case of the now removed 5723 feature, I don't know if it was truly necessary to keep books, I haven't looked into it. It depends on the ecosystem impact I feel like. Still, keeping record is the safe & generally desired default.

Specifically in the case of the specially flagged internal features however (which are only a thing since 2 years ago maybe?) I'm set on 'purging the archives' since I don't care about providing hypothetical users who aren't stdlib devs further internal information for migrating a feature they shouldn't've used in the first place. rustc carries enough historical baggage, I don't want to increase it.

@jdonszelmann
Copy link
Contributor

r? me

@rustbot rustbot assigned jdonszelmann and unassigned mati865 Feb 17, 2026
@jdonszelmann
Copy link
Contributor

I think this one should just be properly removed

@jdonszelmann
Copy link
Contributor

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 17, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 17, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@cyrgani cyrgani added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 17, 2026
@jdonszelmann
Copy link
Contributor

I think this is genuinely nicest, and it's internal anyway. If someone cares enough, undo that decision, but it's an @bors r+ rollup from me

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 17, 2026

📌 Commit 83ef505 has been approved by jdonszelmann

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 17, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Feb 18, 2026
…zelmann

make `rustc_allow_const_fn_unstable` an actual `rustc_attrs` attribute

It is already named like one, but used to have its own feature gate, which this PR now removes in favor of just using `#![feature(rustc_attrs)]`.

Most of the diff is just the line number changes in `malformed-attrs.stderr`.
jhpratt added a commit to jhpratt/rust that referenced this pull request Feb 18, 2026
…zelmann

make `rustc_allow_const_fn_unstable` an actual `rustc_attrs` attribute

It is already named like one, but used to have its own feature gate, which this PR now removes in favor of just using `#![feature(rustc_attrs)]`.

Most of the diff is just the line number changes in `malformed-attrs.stderr`.
jhpratt added a commit to jhpratt/rust that referenced this pull request Feb 18, 2026
…zelmann

make `rustc_allow_const_fn_unstable` an actual `rustc_attrs` attribute

It is already named like one, but used to have its own feature gate, which this PR now removes in favor of just using `#![feature(rustc_attrs)]`.

Most of the diff is just the line number changes in `malformed-attrs.stderr`.
rust-bors bot pushed a commit that referenced this pull request Feb 18, 2026
Rollup of 19 pull requests

Successful merges:

 - #145399 (Unify wording of resolve error)
 - #150473 (tail calls: fix copying non-scalar arguments to callee)
 - #152637 (Add a note about elided lifetime)
 - #152657 (std: move `exit` out of PAL)
 - #152729 (compiler: Don't mark `SingleUseConsts` MIR pass as "required for soundness")
 - #152753 (remove the explicit error for old `rental` versions)
 - #152758 (Remove ShallowInitBox.)
 - #151530 (Fix invalid `mut T` suggestion for `&mut T` in missing lifetime error)
 - #152179 (Add documentation note about signed overflow direction)
 - #152474 (Implement opt-bisect-limit for MIR)
 - #152509 (tests/ui/test-attrs: add annotations for reference rules)
 - #152672 (std: use libc version of `_NSGetArgc`/`_NSGetArgv`)
 - #152711 (resolve: Disable an assert that no longer holds)
 - #152732 (add regression test for 147958)
 - #152745 (Fix ICE in `suggest_param_env_shadowing` with incompatible args)
 - #152749 (make `rustc_allow_const_fn_unstable` an actual `rustc_attrs` attribute)
 - #152756 (Miri: recursive validity: also recurse into Boxes)
 - #152770 (carryless_mul: mention the base)
 - #152778 (Update tracking issue number for final_associated_functions)
rust-bors bot pushed a commit that referenced this pull request Feb 18, 2026
Rollup of 20 pull requests

Successful merges:

 - #145399 (Unify wording of resolve error)
 - #150473 (tail calls: fix copying non-scalar arguments to callee)
 - #152637 (Add a note about elided lifetime)
 - #152729 (compiler: Don't mark `SingleUseConsts` MIR pass as "required for soundness")
 - #152751 (Rename dep node "fingerprints" to distinguish key and value hashes)
 - #152753 (remove the explicit error for old `rental` versions)
 - #152758 (Remove ShallowInitBox.)
 - #151530 (Fix invalid `mut T` suggestion for `&mut T` in missing lifetime error)
 - #152179 (Add documentation note about signed overflow direction)
 - #152474 (Implement opt-bisect-limit for MIR)
 - #152509 (tests/ui/test-attrs: add annotations for reference rules)
 - #152672 (std: use libc version of `_NSGetArgc`/`_NSGetArgv`)
 - #152711 (resolve: Disable an assert that no longer holds)
 - #152725 (Rework explanation of CLI lint level flags)
 - #152732 (add regression test for 147958)
 - #152745 (Fix ICE in `suggest_param_env_shadowing` with incompatible args)
 - #152749 (make `rustc_allow_const_fn_unstable` an actual `rustc_attrs` attribute)
 - #152756 (Miri: recursive validity: also recurse into Boxes)
 - #152770 (carryless_mul: mention the base)
 - #152778 (Update tracking issue number for final_associated_functions)
@rust-bors rust-bors bot merged commit e53dd52 into rust-lang:main Feb 18, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 18, 2026
rust-timer added a commit that referenced this pull request Feb 18, 2026
Rollup merge of #152749 - cyrgani:rustc-allow-const, r=jdonszelmann

make `rustc_allow_const_fn_unstable` an actual `rustc_attrs` attribute

It is already named like one, but used to have its own feature gate, which this PR now removes in favor of just using `#![feature(rustc_attrs)]`.

Most of the diff is just the line number changes in `malformed-attrs.stderr`.
@cyrgani cyrgani deleted the rustc-allow-const branch February 18, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

Comments