GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Tracking Issue for RFC 3762, "Make trait methods callable in const contexts" · Issue #143874 · rust-lang/rust

Tracking Issue for RFC 3762, "Make trait methods callable in const contexts" #143874

New issue
Copy link
New issue
Copy link
Open
1 / 61 of 6 issues completed
Open
Tracking Issue for RFC 3762, "Make trait methods callable in const contexts"#143874
1 / 61 of 6 issues completed
Copy link
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-trait-systemArea: Trait systemArea: Trait systemB-experimentalBlocker: In-tree experiment; RFC pending, not yet approved or unneeded (requires FCP to stabilize).Blocker: In-tree experiment; RFC pending, not yet approved or unneeded (requires FCP to stabilize).B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-const_trait_impl`#![feature(const_trait_impl)]``#![feature(const_trait_impl)]`PG-const-traitsProject group: Const traitsProject group: Const traitsS-tracking-needs-design-proposalStatus: This needs a clear design proposal and then a meeting with the team.Status: This needs a clear design proposal and then a meeting with the team.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.WG-const-evalWorking group: Const evaluationWorking group: Const evaluation

Description

@fee1-dead
fee1-dead
opened on Jul 13, 2025
Issue body actions

This is a tracking issue for the RFC "3762" (rust-lang/rfcs#3762).
The feature gate for the issue is #![feature(const_trait_impl)].

Note

Questions about the usage of this feature should be directed to the t-compiler/project-const-traits Zulip channel. Use t-lang/effects and the RFC (until it gets accepted) to discuss the language feature and future extensions.

About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.

Components

  • #[const_trait] attribute Removed for good
  • impl const Trait
  • T: [const] Trait
  • append_const_msg on rustc_on_unimplemented removed in Remove rustc_on_unimplemented's append_const_msg #154653
  • #[derive_const]
  • trait Destruct

Steps

  • Implement the RFC
  • Add const trait Trait and migrate away from #[const_trait] parse const trait Trait #143879
  • Split derive_const, -> impl [const] Trait into separate feature[s] to make initial stabilization minimal
  • add a perf stress test for const trait impls and complex bounds that need solving
  • Adjust documentation (see instructions on rustc-dev-guide)
  • Style updates for any new syntax (nightly-style-procedure)
    • Style team decision on new formatting
    • Formatting for new syntax has been added to the Style Guide
    • (non-blocking) Formatting has been implemented in rustfmt
  • Stabilization PR (see instructions on rustc-dev-guide)
    • Error against putting rustc_const_unstable attribute on const impls as they are now insta-stable.
    • Treat const trait default method bodies and const impl bodies as stable const fn bodies. We need to prevent accidentally stabilizing an implementation that uses unstable lang/lib const fn features.
    • Change Rustdoc to display [const] bounds or what syntax we decided it to be.

Unresolved Questions

  • #[derive_const] for custom derives (proc macros) Provide a way for derives to know if they were invoked with #[derive_const] #118304

Implementation history

  • See Tracking issue for closed RFC 2632, impl const Trait for Ty and [const] (conditionally const) syntax (const_trait_impl) #67792 for previous tracking issue and its history
  • Incomplete list of PRs implementing/refining the feature: https://github.com/rust-lang/rust/pulls?q=is%3Apr+label%3AF-const_trait_impl+is%3Aclosed+
  • Add a diagnostic attribute for special casing const bound errors for non-const impls #148641
Reacted by Rodrigo, nooriro, Filiprogrammer, Karan Jain, L. APPLE, Gabriel Bjørnager Jensen, Alex Abdugafarov, andjsrk, oq_, Peter Lyons Kehl and 54 more
Reacted by Carlo Corradini, Vladislav Sukhmel, Albin Hedman, Hanna Kruppe, Connor Tsui, toymil, Alisa Sireneva, José Luis Cruz, Evan Almloff, Robert and 51 more
Reacted by Gabriel Bjørnager Jensen, interactive-toast, oq_, Antoine Clarman, bbb651 🇮🇱, Streq, Thomas Zahner, Nano, Elias, James Muriuki and 4 more
Reacted by Ivan Sotnikov, Alexander Medvedev, Viktor Popp and Will Buckner

Activity

Next
  1. fee1-dead
    added
    T-langRelevant to the language teamRelevant to the language team
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFC
    F-const_trait_impl`#![feature(const_trait_impl)]``#![feature(const_trait_impl)]`
    WG-const-evalWorking group: Const evaluationWorking group: Const evaluation
    PG-const-traitsProject group: Const traitsProject group: Const traits
    on Jul 13, 2025
  2. fee1-dead
    marked Tracking issue for closed RFC 2632, impl const Trait for Ty and [const] (conditionally const) syntax (const_trait_impl) #67792 as a duplicate of this issue on Jul 13, 2025
  3. fee1-dead
    added
    A-trait-systemArea: Trait systemArea: Trait system
    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)
    on Jul 13, 2025
  4. carlocorradini commented on Jul 13, 2025

    @carlocorradini
    carlocorradini
    on Jul 13, 2025 · Hidden as off-topic
    show commentMore actions
  5. clarfonthey commented on Jul 13, 2025

    @clarfonthey
    clarfonthey
    on Jul 13, 2025
    Contributor
    More actions

    Should this tracking issue also be used for constifying libstd traits or should that get a separate issue? Since that was the trend before the current RFC, but there's been a lot of lapsing since, and it probably would require opening a lot of new issues to fix it.

    I think that at least some traits that are kind of fundamental and require extra compiler support (like Fn*) should be tracked here but mostly just want to clarify.

    Edit: also to clarify, since I'm particularly interested in constifying a bunch of traits to make SIMD operations const-usable, I'd be more than happy to spearhead the effort to separate out the const traits into their own tracking issues. Just want to make sure this is the desired approach before I do anything.

    Reacted by Ricardo Fernández Serrata
  6. fee1-dead commented on Jul 13, 2025

    @fee1-dead
    fee1-dead
    on Jul 13, 2025
    MemberAuthor
    More actions

    Should this tracking issue also be used for constifying libstd traits or should that get a separate issue?

    I think we're okay with separate tracking issues but please make sure that those tracking issues link back to this one. As when we do stabilize const traits most of those have to be stabilized in tandem (since you can't really keep const impls unstable).

    Reacted by Clar Fon and waffle
  7. clarfonthey commented on Jul 13, 2025

    @clarfonthey
    clarfonthey
    on Jul 13, 2025
    Contributor
    More actions

    (since you can't really keep const impls unstable).

    Wouldn't #140399 help with that, presuming that this PR + some form of it that works for const-stability also apply before const traits are stable?

    (I agree with you on linking back here, though.)

  8. compiler-errors commented on Jul 13, 2025

    @compiler-errors
    compiler-errors
    on Jul 13, 2025
    Contributor
    More actions

    As when we do stabilize const traits most of those have to be stabilized in tandem (since you can't really keep const impls unstable).

    I'm not really sure if I understand the point made here about stabilizing things at the same time of stabilizing const traits in general.

    Isn't that the the whole point of the feature checking in #135423 + #136055?

    We definitely should be able to constify traits piecewise without them being insta-stable when we stabilize the const_trait_impl feature gate. Of course impls can't be constified individually, but traits should be at least.

  9. fee1-dead commented on Jul 13, 2025

    @fee1-dead
    fee1-dead
    on Jul 13, 2025
    MemberAuthor
    More actions

    sorry, I misspoke in my earlier comment. because we have const stability enforced on traits now we can of course keep traits const_unstable in libstd when we stabilize const_trait_impl, so yeah they should all be split

  10. 43 remaining items

  11. RodrigoVillar
    added a commit that references this issue on Jun 5, 2026

    chore: add TODO checker (#2044)

    d2257bd
  12. smir-ant
    added 3 commits that reference this issue on Jul 12, 2026

    refactor(pg-proto): DEF-115/116/117 — round-3 tier escalations

    324948f

    refactor(pg-proto): DEF-116 closed via declarative macro — auto-scali…

    91a0f5e

    docs(deferred): add §22 Rust-unstable watchlist

    659942d
  13. mhieuhonda
    added a commit that references this issue on Aug 14, 2026

    fix(rust): bỏ const fn cho role methods — Rust 1.97 chưa ổn định Part…

    c1e6b9d
  14. ingim
    added a commit that references this issue on Aug 17, 2026

    layout, gemm: a pin that catches a swap, and the blind spot named pro…

    1d58dab
  15. drzln
    added 4 commits that reference this issue on Aug 22, 2026

    feat: const-fn FigmentSourceTag is_file/is_code/is_custom + kind and …

    22b705a

    feat: const-fn FigmentNameTag is_format/is_env + kind and FigmentName…

    41ca5ca

    feat: const-fn EnvMetadataTag is_prefixed/is_bare + kind and EnvMetad…

    d8db91f

    feat: const-fn AttributionRule confidence + is_exact/is_fallback — cl…

    94441c8
  16. drzln
    added 4 commits that reference this issue on Sep 6, 2026

    perf: make ReloadFailure::attribution_confidence const fn

    6d160c8

    perf: close ReloadFailure Some-iff-attribution forwarder quartet cons…

    51975c3

    feat: add EnvMetadataTag::ordinal and as_str tag-side sibling pair

    3489578

    feat: lift axis_at<A: ClosedAxis>() to `const fn`, closing the trait-…

    02bcdf5
  17. cdprice02
    added a commit that references this issue on Sep 14, 2026

    docs: write down the commentary rule, and check the part a machine can (

    254f7ed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-trait-systemArea: Trait systemArea: Trait systemB-experimentalBlocker: In-tree experiment; RFC pending, not yet approved or unneeded (requires FCP to stabilize).Blocker: In-tree experiment; RFC pending, not yet approved or unneeded (requires FCP to stabilize).B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-const_trait_impl`#![feature(const_trait_impl)]``#![feature(const_trait_impl)]`PG-const-traitsProject group: Const traitsProject group: Const traitsS-tracking-needs-design-proposalStatus: This needs a clear design proposal and then a meeting with the team.Status: This needs a clear design proposal and then a meeting with the team.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.WG-const-evalWorking group: Const evaluationWorking group: Const evaluation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.