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:

https://github.com/rust-lang/rust/blob/3fb1b53a9dbfcdf37a4b67d35cde373316829930/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
2024-04-07 17:38:07 -03:00
2024-03-03 16:30:48 -03:00
2024-02-07 10:42:01 +08:00
2024-03-03 16:30:48 -03:00
2024-03-03 16:30:48 -03:00
2023-04-20 15:06:17 -03:00
2024-02-07 10:42:01 +08:00
2023-10-13 19:18:46 +00:00
2025-02-03 10:39:32 -05:00
2023-12-05 17:15:46 +00:00
2025-06-30 11:50:19 +05:00
2025-06-30 11:50:19 +05:00
2024-01-05 10:00:59 +00:00