rust/compiler/rustc_passes
Matthias Krüger 51c686f32b
Rollup merge of #128701 - veera-sivarajan:fix-128604, r=estebank
Don't Suggest Labeling `const` and `unsafe` Blocks

Fixes #128604

Previously, both anonymous constant blocks (E.g. The labeled block
inside `['_'; 'block: { break 'block 1 + 2; }]`) and inline const
blocks (E.g. `const { ... }`) were considered to be the same
kind of blocks. This caused the compiler to incorrectly suggest
labeling both the blocks when only anonymous constant blocks can be
labeled.

This PR adds an other enum variant to `Context` so that both the
blocks can be handled appropriately.

Also, adds some doc comments and removes unnecessary `&mut` in a
couple of places.
2024-09-03 19:13:23 +02:00
..
src Rollup merge of #128701 - veera-sivarajan:fix-128604, r=estebank 2024-09-03 19:13:23 +02:00
Cargo.toml
messages.ftl Revert "Auto merge of #127537 - veluca93:struct_tf, r=BoxyUwU" 2024-09-01 16:35:53 +02:00