Files
rust/tests/ui/traits
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-25 23:39:26 +00:00
2025-07-13 13:50:01 +00:00
2025-07-31 15:39:55 +02:00
2025-07-13 13:50:01 +00:00
2025-07-25 20:38:54 +05:00
2025-06-08 11:25:09 +05:00
2024-10-18 00:33:50 +02:00
2025-07-31 21:25:49 +05:00
2025-02-03 10:39:32 -05:00
2025-06-30 11:50:19 +05:00
2025-06-30 11:50:19 +05:00