Skip to content

const blocks as a mod item#149174

Merged
rust-bors[bot] merged 6 commits intorust-lang:mainfrom
GrigorenkoPV:const_block_item
Jan 24, 2026
Merged

const blocks as a mod item#149174
rust-bors[bot] merged 6 commits intorust-lang:mainfrom
GrigorenkoPV:const_block_item

Conversation

@GrigorenkoPV
Copy link
Copy Markdown
Contributor

@GrigorenkoPV GrigorenkoPV commented Nov 21, 2025

Tracking issue: #149226

This adds support for writing const { ... } as an item in a module. In the current implementation, this is a unique AST item that gets lowered to const _: () = const { ... }; in HIR.

rustfmt support included.

TODO:

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

Labels

I-lang-radar Items that are on lang's radar and will need eventual work or consideration. 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-lang Relevant to the language team T-rustdoc Relevant to the rustdoc 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.

9 participants