Fix Error Messages for `break` Inside Coroutines by veera-sivarajan · Pull Request #124777 · rust-lang/rust
rustbot
added
S-waiting-on-review
labels
May 5, 2024
rustbot
added
S-waiting-on-author
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.labels
May 5, 2024
rustbot
added
S-waiting-on-review
and removed S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.labels
May 6, 2024
rustbot
added
S-waiting-on-author
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.labels
May 7, 2024Previously, `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`.
bors
added
S-waiting-on-bors
and removed S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.labels
May 8, 2024bors added a commit to rust-lang-ci/rust that referenced this pull request
May 9, 2024…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#124777 (Fix Error Messages for `break` Inside Coroutines) - rust-lang#124837 (Migrate `run-make/rustdoc-map-file` to rmake) - rust-lang#124875 (Fix more ICEs in `diagnostic::on_unimplemented`) - rust-lang#124908 (Handle field projections like slice indexing in invalid_reference_casting) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
May 9, 2024Rollup merge of rust-lang#124777 - veera-sivarajan:bugfix-124495-identify-gen-block, r=compiler-errors Fix Error Messages for `break` Inside Coroutines Fixes rust-lang#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`.~~
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters