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

Check break target availability when checking breaks with values #66863

Merged
merged 1 commit into from
Dec 6, 2019

Conversation

osa1
Copy link
Contributor

@osa1 osa1 commented Nov 29, 2019

Fixes #66702

I'll be adding a regression test.

@rust-highfive
Copy link
Collaborator

r? @cramertj

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 29, 2019
@hellow554

This comment has been minimized.

@osa1

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@osa1

This comment has been minimized.

@osa1 osa1 force-pushed the fix_66702 branch 2 times, most recently from 729b992 to f8d5786 Compare November 29, 2019 11:09
@osa1
Copy link
Contributor Author

osa1 commented Nov 29, 2019

  • Regression test added
  • Issue with multiple borrow_mut()s fixed (by duplicating code 😞 )

@cramertj
Copy link
Member

cramertj commented Dec 2, 2019

r=me with @Centril's nit fixed.

@osa1
Copy link
Contributor Author

osa1 commented Dec 3, 2019

Test renamed.

@Centril
Copy link
Contributor

Centril commented Dec 3, 2019

@bors r=cramertj

@bors
Copy link
Contributor

bors commented Dec 3, 2019

📌 Commit 06f85858e1e7b9c603a4b5ec79d12bb9dc00e335 has been approved by cramertj

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 3, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-12-03T06:36:13.9615477Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-03T06:36:13.9818652Z ##[command]git config gc.auto 0
2019-12-03T06:36:13.9880950Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-03T06:36:13.9932825Z ##[command]git config --get-all http.proxy
2019-12-03T06:36:14.0069411Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66863/merge:refs/remotes/pull/66863/merge
---
2019-12-03T07:33:16.1887225Z .................................................................................................... 1600/9320
2019-12-03T07:33:20.6777006Z .................................................................................................... 1700/9320
2019-12-03T07:33:32.7707836Z ........................................i........................................................... 1800/9320
2019-12-03T07:33:40.3068781Z .................................................................................................... 1900/9320
2019-12-03T07:33:53.4686791Z .........................iiiii...................................................................... 2000/9320
2019-12-03T07:34:03.1319313Z .................................................................................................... 2200/9320
2019-12-03T07:34:05.5517643Z .................................................................................................... 2300/9320
2019-12-03T07:34:09.9437856Z .................................................................................................... 2400/9320
2019-12-03T07:34:30.5936458Z .................................................................................................... 2500/9320
---
2019-12-03T07:37:04.2703597Z ..........................i...............i......................................................... 4800/9320
2019-12-03T07:37:14.4598776Z .................................................................................................... 4900/9320
2019-12-03T07:37:20.2646771Z .................................................................................................... 5000/9320
2019-12-03T07:37:28.1542704Z ...............................F.................................................................... 5100/9320
2019-12-03T07:37:35.7121056Z .................................ii.ii...........i.................................................. 5200/9320
2019-12-03T07:37:45.2531847Z .................................................................................................... 5400/9320
2019-12-03T07:37:55.2097896Z .................................................................................................... 5500/9320
2019-12-03T07:38:02.2262553Z ...............i.................................................................................... 5600/9320
2019-12-03T07:38:08.2859875Z .................................................................................................... 5700/9320
2019-12-03T07:38:08.2859875Z .................................................................................................... 5700/9320
2019-12-03T07:38:19.2687239Z .................................................................................................... 5800/9320
2019-12-03T07:38:30.9231607Z .ii...i..ii...........i............................................................................. 5900/9320
2019-12-03T07:38:48.5575478Z .................................................................................................... 6100/9320
2019-12-03T07:38:55.1456243Z .................................................................................................... 6200/9320
2019-12-03T07:38:55.1456243Z .................................................................................................... 6200/9320
2019-12-03T07:39:09.4506954Z ........................i..ii....................................................................... 6300/9320
2019-12-03T07:39:28.2665263Z ...............................................................................................i.... 6500/9320
2019-12-03T07:39:30.3976515Z .................................................................................................... 6600/9320
2019-12-03T07:39:32.5319319Z .......................................................................................i............ 6700/9320
2019-12-03T07:39:35.1002494Z .................................................................................................... 6800/9320
---
2019-12-03T07:41:07.0505871Z .................................................................................................... 7300/9320
2019-12-03T07:41:11.8332631Z .................................................................................................... 7400/9320
2019-12-03T07:41:17.2347413Z .................................................................................................... 7500/9320
2019-12-03T07:41:23.3241653Z .................................................................................................... 7600/9320
2019-12-03T07:41:34.0737699Z ...................................................................................................i 7700/9320
2019-12-03T07:41:40.7968581Z iii................................................................................................. 7800/9320
2019-12-03T07:41:49.6717042Z ............................ii......i............................................................... 7900/9320
2019-12-03T07:42:05.7482544Z .................................................................................................... 8100/9320
2019-12-03T07:42:17.3955417Z .................................................................................................... 8200/9320
2019-12-03T07:42:23.5651543Z .................................................................................................... 8300/9320
2019-12-03T07:42:47.7955814Z .................................................................................................... 8400/9320
---
2019-12-03T07:44:12.2413144Z 1 error[E0267]: `break` inside of a closure
2019-12-03T07:44:12.2413381Z -   --> $DIR/break-outside-loop-val.rs:5:12
2019-12-03T07:44:12.2413759Z +   --> $DIR/issue-66702-break-outside-loop-val.rs:5:12
2019-12-03T07:44:12.2413910Z 3    |
2019-12-03T07:44:12.2414188Z 4 LL |         || break 'some_label ();
2019-12-03T07:44:12.2414931Z 5    |         -- ^^^^^^^^^^^^^^^^^^^^ cannot `break` inside of a closure
2019-12-03T07:44:12.2415220Z 
2019-12-03T07:44:12.2415276Z The actual stderr differed from the expected stderr.
2019-12-03T07:44:12.2415276Z The actual stderr differed from the expected stderr.
2019-12-03T07:44:12.2415628Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-66702-break-outside-loop-val/issue-66702-break-outside-loop-val.stderr
2019-12-03T07:44:12.2416092Z To update references, rerun the tests and pass the `--bless` flag
2019-12-03T07:44:12.2416536Z To only update this specific test, also pass `--test-args issues/issue-66702-break-outside-loop-val.rs`
2019-12-03T07:44:12.2416859Z error: 1 errors occurred comparing output.
2019-12-03T07:44:12.2416934Z status: exit code: 1
2019-12-03T07:44:12.2416934Z status: exit code: 1
2019-12-03T07:44:12.2417617Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-66702-break-outside-loop-val.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-66702-break-outside-loop-val" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-66702-break-outside-loop-val/auxiliary" "-A" "unused"
2019-12-03T07:44:12.2417895Z ------------------------------------------
2019-12-03T07:44:12.2418047Z 
2019-12-03T07:44:12.2418381Z ------------------------------------------
2019-12-03T07:44:12.2418536Z stderr:
2019-12-03T07:44:12.2418536Z stderr:
2019-12-03T07:44:12.2419325Z ------------------------------------------
2019-12-03T07:44:12.2419526Z error[E0267]: `break` inside of a closure
2019-12-03T07:44:12.2419937Z   --> /checkout/src/test/ui/issues/issue-66702-break-outside-loop-val.rs:5:12
2019-12-03T07:44:12.2420010Z    |
2019-12-03T07:44:12.2420460Z LL |         || break 'some_label (); //~ ERROR: `break` inside of a closure
2019-12-03T07:44:12.2420911Z    |         -- ^^^^^^^^^^^^^^^^^^^^ cannot `break` inside of a closure
2019-12-03T07:44:12.2421287Z    |         enclosing closure
2019-12-03T07:44:12.2421343Z 
2019-12-03T07:44:12.2421406Z error: aborting due to previous error
2019-12-03T07:44:12.2421464Z 
---
2019-12-03T07:44:12.2424039Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-12-03T07:44:12.2424114Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-12-03T07:44:12.2424137Z 
2019-12-03T07:44:12.2424155Z 
2019-12-03T07:44:12.2425598Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-12-03T07:44:12.2426167Z 
2019-12-03T07:44:12.2426210Z 
2019-12-03T07:44:12.2426263Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-12-03T07:44:12.2426321Z Build completed unsuccessfully in 1:01:52
2019-12-03T07:44:12.2426321Z Build completed unsuccessfully in 1:01:52
2019-12-03T07:44:12.2426371Z == clock drift check ==
2019-12-03T07:44:12.2426422Z   local time: Tue Dec  3 07:44:11 UTC 2019
2019-12-03T07:44:12.2701773Z   network time: Tue, 03 Dec 2019 07:44:12 GMT
2019-12-03T07:44:12.2702944Z == end clock drift check ==
2019-12-03T07:44:13.0651265Z 
2019-12-03T07:44:13.0752503Z ##[error]Bash exited with code '1'.
2019-12-03T07:44:13.0797082Z ##[section]Starting: Checkout
2019-12-03T07:44:13.0798834Z ==============================================================================
2019-12-03T07:44:13.0798879Z Task         : Get sources
2019-12-03T07:44:13.0798919Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@Centril
Copy link
Contributor

Centril commented Dec 3, 2019

@bors r- ^

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 3, 2019
@osa1
Copy link
Contributor Author

osa1 commented Dec 3, 2019

Ahh, file name in stderr file needs to be updated ...

@osa1
Copy link
Contributor Author

osa1 commented Dec 3, 2019

Should be good to go now. Sorry for the noise.

@cramertj
Copy link
Member

cramertj commented Dec 3, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Dec 3, 2019

📌 Commit 6857c93 has been approved by cramertj

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 3, 2019
Centril added a commit to Centril/rust that referenced this pull request Dec 5, 2019
Check break target availability when checking breaks with values

Fixes rust-lang#66702

I'll be adding a regression test.
bors added a commit that referenced this pull request Dec 5, 2019
Rollup of 9 pull requests

Successful merges:

 - #66710 (weak-into-raw: Clarify some details in Safety)
 - #66863 (Check break target availability when checking breaks with values)
 - #67002 (Fix documentation of pattern for str::matches())
 - #67005 (capitalize Rust)
 - #67010 (Accurately portray raw identifiers in error messages)
 - #67011 (Include a span in more `expected...found` notes)
 - #67044 (E0023: handle expected != tuple pattern type)
 - #67045 (rustc_parser: cleanup imports)
 - #67055 (Make const-qualification look at more `const fn`s)

Failed merges:

r? @ghost
@bors bors merged commit 6857c93 into rust-lang:master Dec 6, 2019
@osa1 osa1 deleted the fix_66702 branch December 6, 2019 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Labeled break in async fn ICE's
6 participants