mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-23 15:57:09 +00:00
Inherent const impl Some constifications are annoying because we need to repeat `T: Trait` bounds from an impl block on the individual constified `const fn`s 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`
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.