about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/example/std_example.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-05-09 06:04:38 +0200
committerGitHub <noreply@github.com>2024-05-09 06:04:38 +0200
commit9b834d01e5face5a0869626f429bd68229c09afe (patch)
tree3a25b41184307a8807963efdbfa203018099763f /compiler/rustc_codegen_cranelift/example/std_example.rs
parentee9a9f84c599492eb9613292394d6d05d9f9e6ba (diff)
parent21ccec0cc8a5ee253f021cdc81e05dbab43e59e1 (diff)
downloadrust-9b834d01e5face5a0869626f429bd68229c09afe.tar.gz
rust-9b834d01e5face5a0869626f429bd68229c09afe.zip
Rollup merge of #124777 - veera-sivarajan:bugfix-124495-identify-gen-block, r=compiler-errors
Fix Error Messages for `break` Inside Coroutines

Fixes #124495

Previously, `break` inside `gen` blocks and functions
were incorrectly identified to be enclosed by a closure.

This PR fixes it by displaying an appropriate error message
for async blocks, async closures, async functions, gen blocks,
gen closures, gen functions, async gen blocks, async gen closures
and async gen functions.

Note: gen closure and async gen closure are not supported by the
compiler yet but I have added an error message here assuming that
they might be implemented in the future.

~~Also, fixes grammar in a few places by replacing
`inside of a $coroutine` with `inside a $coroutine`.~~
Diffstat (limited to 'compiler/rustc_codegen_cranelift/example/std_example.rs')
0 files changed, 0 insertions, 0 deletions