Matthias Krüger
0bb15457de
Rollup merge of #149174 - GrigorenkoPV:const_block_item, r=me,ytmimi
...
`const` blocks as a `mod` item
Tracking issue: rust-lang/rust#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:
- `pub const { ... }` does not make sense (see rust-lang/rust#147136 ). Reject it. Should this be rejected by the parser or smth?
- Improve diagnostics (preferably they should not mention the fake `_` ident).
2026-01-24 15:35:08 +01:00
..
2026-01-19 18:26:53 +11:00
2026-01-24 15:35:08 +01:00
2026-01-21 19:36:27 +03:00
2026-01-21 18:12:21 +03:00
2026-01-21 19:36:27 +03:00
2026-01-22 02:34:28 +00:00
2026-01-23 11:07:55 +01:00
2026-01-24 15:35:08 +01:00
2026-01-21 18:52:08 +01:00
2026-01-21 02:04:01 -05:00
2026-01-23 11:07:57 +01:00
2026-01-24 07:04:14 +00:00
2026-01-22 13:35:40 +01:00
2026-01-22 13:35:41 +01:00
2026-01-22 02:34:28 +00:00
2026-01-18 18:30:11 +01:00
2026-01-22 00:37:43 -05:00
2026-01-24 15:35:08 +01:00
2026-01-24 15:35:08 +01:00
2026-01-21 20:03:56 -05:00
2026-01-24 15:35:08 +01:00
2026-01-22 20:42:11 +01:00
2026-01-22 20:42:10 +01:00
2026-01-21 12:02:26 +11:00
2026-01-16 04:25:12 +05:30
2026-01-19 18:26:53 +11:00
2026-01-22 02:34:28 +00:00
2026-01-22 00:37:43 -05:00
2026-01-22 02:34:28 +00:00
2026-01-23 11:07:55 +01:00
2026-01-21 20:03:56 -05:00
2026-01-22 02:34:28 +00:00
2026-01-23 13:58:17 +11:00
2026-01-19 20:53:24 +01:00
2026-01-19 18:26:53 +11:00
2026-01-21 20:03:56 -05:00
2026-01-22 13:35:42 +01:00
2026-01-21 02:04:01 -05:00
2026-01-24 15:35:08 +01:00
2026-01-24 15:35:08 +01:00
2026-01-19 17:39:49 +01:00
2026-01-20 12:54:40 -06:00
2026-01-23 13:58:17 +11:00
2026-01-23 13:58:17 +11:00
2026-01-24 15:35:08 +01:00
2026-01-23 11:07:55 +01:00
2026-01-24 15:35:08 +01:00
2026-01-21 12:53:45 +01:00
2026-01-24 08:18:06 +01:00
2026-01-21 12:53:48 +01:00
2026-01-19 16:08:54 +00:00
2026-01-19 18:26:53 +11:00
2026-01-20 12:54:40 -06:00