about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorVeera <sveera.2001@gmail.com>2024-05-05 18:14:23 -0400
committerVeera <sveera.2001@gmail.com>2024-05-08 17:32:25 -0400
commit21ccec0cc8a5ee253f021cdc81e05dbab43e59e1 (patch)
tree39fdbd5ef26251e1feb9f0142d0ec4ecfc237867 /compiler/rustc_codegen_llvm/src/errors.rs
parent4271383e1d7ccc5dcd95bd130182e722e9a8ca2a (diff)
downloadrust-21ccec0cc8a5ee253f021cdc81e05dbab43e59e1.tar.gz
rust-21ccec0cc8a5ee253f021cdc81e05dbab43e59e1.zip
Fix Error Messages for `break` Inside Coroutines
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_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions