about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-09-03 19:13:23 +0200
committerGitHub <noreply@github.com>2024-09-03 19:13:23 +0200
commit51c686f32b937065b22ac416065733980d936f4c (patch)
tree2431fad806c7efc8cbffd9b58a6aa59124245e93 /compiler/rustc_pattern_analysis/src
parentf75a1954eb1c358c5a2ef99736dabac636d40ef7 (diff)
parentf003e92a5ba73c673f0faeaac01b6eac6ba3f76a (diff)
downloadrust-51c686f32b937065b22ac416065733980d936f4c.tar.gz
rust-51c686f32b937065b22ac416065733980d936f4c.zip
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.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions