Skip to content

Inherent const impl#148434

Merged
bors merged 7 commits intorust-lang:mainfrom
oli-obk:inherent-const-impl
Nov 19, 2025
Merged

Inherent const impl#148434
bors merged 7 commits intorust-lang:mainfrom
oli-obk:inherent-const-impl

Conversation

@oli-obk
Copy link
Copy Markdown
Contributor

@oli-obk oli-obk commented Nov 3, 2025

Some constifications are annoying because we need to repeat T: Trait bounds from an impl block on the individual constified const fns as T: [const] Trait. We've brainstormed solutions before, and one would be to have separate const impl blocks or sth. However the final syntax will look, I decided to just impl this syntax and either have sth nice on nightly to work with or at least move the discussion along.

Also interacts with the discussion around impl const Trait for Type vs const impl Trait for Type, as we may want to use the latter to keep inherent and trait impls in sync (unless we come up with even another scheme).

  • rustdoc + tests
  • macro stability /regression tests

r? @fee1-dead

cc @traviscross @rust-lang/project-const-traits

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

Labels

F-const_trait_impl `#![feature(const_trait_impl)]` merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. PG-const-traits Project group: Const traits S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants