Files
rust/compiler
Samuel Tardieu 4cb0ebd24f Rollup merge of #144741 - ShoyuVanilla:tilde-const-in-block, r=fee1-dead
fix: Error on illegal `[const]`s inside blocks within legal positions

Fixes rust-lang/rust#132067

I initially considered moving `[const]` validations to `rustc_ast_lowering`, but that approach would require adding constness information to `AssocCtxt`, which introduces significant changes - especially within `rustc_expand` - just to support a single use case here:

3fb1b53a9d/compiler/rustc_ast_passes/src/ast_validation.rs (L1596-L1610)

Instead, I believe it's sufficient to simply "reset" `[const]` allowness whenever we enter a new block.
2025-08-05 03:51:34 +02:00
..
2025-07-29 14:17:48 +00:00
2025-07-31 19:58:04 +10:00
2025-07-31 19:58:04 +10:00
2025-07-31 19:58:04 +10:00
2025-07-31 19:58:04 +10:00