Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve diagnostics: break/continue in wrong context #63780

Merged
merged 3 commits into from Aug 21, 2019

Conversation

@u32i64
Copy link
Contributor

commented Aug 21, 2019

  • Fix #63712
  • Use `break` or `continue` instead of always break in cannot _...
  • Show the enclosing closure or async block we're talking about
  • `break` outside of loop -> `break` outside of a loop for consistency

r? @estebank

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Aug 21, 2019

Some changes occurred in diagnostic error codes

cc @GuillaumeGomez

src/librustc_passes/loops.rs Outdated Show resolved Hide resolved
u32i64 added 2 commits Aug 21, 2019
@estebank

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2019

@bors r+ rollup

@bors

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2019

📌 Commit 600a64b has been approved by estebank

Centril added a commit to Centril/rust that referenced this pull request Aug 21, 2019
Rollup merge of rust-lang#63780 - u32i64:issue-63712, r=estebank
Improve diagnostics: break/continue in wrong context

- Fix rust-lang#63712
- Use `` `break` `` or `` `continue` `` instead of always `break` in `cannot _...`
- Show the enclosing closure or async block we're talking about
- `` `break` outside of loop `` -> `` `break` outside of a loop `` for consistency

r? @estebank
bors added a commit that referenced this pull request Aug 21, 2019
Auto merge of #63790 - Centril:rollup-m4ax3r9, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #61236 (take into account the system theme)
 - #63717 (Fix nested eager expansions in arguments of `format_args`)
 - #63747 (update Miri)
 - #63772 (ci: move libc mirrors to the rust-lang-ci-mirrors bucket)
 - #63780 (Improve diagnostics: break/continue in wrong context)
 - #63781 (Run Clippy without json-rendered flag)

Failed merges:

r? @ghost

@bors bors merged commit 600a64b into rust-lang:master Aug 21, 2019

4 checks passed

pr Build #20190821.30 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (LinuxTools) LinuxTools succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.