51c686f32b
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. |
||
---|---|---|
.. | ||
liveness | ||
abi_test.rs | ||
check_attr.rs | ||
check_const.rs | ||
dead.rs | ||
debugger_visualizer.rs | ||
diagnostic_items.rs | ||
entry.rs | ||
errors.rs | ||
hir_id_validator.rs | ||
hir_stats.rs | ||
lang_items.rs | ||
layout_test.rs | ||
lib_features.rs | ||
lib.rs | ||
liveness.rs | ||
loops.rs | ||
naked_functions.rs | ||
reachable.rs | ||
stability.rs | ||
upvars.rs | ||
weak_lang_items.rs |