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 commented Nov 29, 2019

Fixes #66702

I'll be adding a regression test.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Nov 29, 2019

r? @cramertj

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

@hellow554

This comment was marked as resolved.

Copy link
Contributor

hellow554 commented Nov 29, 2019

Can you please add a testcase, e.g. #66702 (comment) ?

@osa1

This comment was marked as resolved.

Copy link
Contributor Author

osa1 commented Nov 29, 2019

Can you please add a testcase, e.g. #66702 (comment) ?

Will do. Had to push this before going AFK for a bit.

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Nov 29, 2019

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-11-29T09:13:18.8215285Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-29T09:13:18.8232869Z ##[command]git config gc.auto 0
2019-11-29T09:13:18.8234750Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-29T09:13:18.8239320Z ##[command]git config --get-all http.proxy
2019-11-29T09:13:18.8243225Z ##[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-11-29T09:44:52.8448649Z    Compiling rustc_driver v0.0.0 (/checkout/src/librustc_driver)
2019-11-29T09:44:52.8449188Z    Compiling once_cell v1.1.0
2019-11-29T09:44:53.0714253Z    Compiling semver v0.9.0
2019-11-29T09:44:54.9943779Z    Compiling crossbeam-utils v0.6.5
2019-11-29T09:44:55.1849415Z thread 'rustc' panicked at 'already borrowed: BorrowMutError', src/libcore/macros/mod.rs:23:13
2019-11-29T09:44:55.1850320Z 
2019-11-29T09:44:55.1850369Z error: internal compiler error: unexpected panic
2019-11-29T09:44:55.1850421Z 
2019-11-29T09:44:55.1850469Z note: the compiler unexpectedly panicked. this is a bug.
2019-11-29T09:44:55.1850469Z note: the compiler unexpectedly panicked. this is a bug.
2019-11-29T09:44:55.1850500Z 
2019-11-29T09:44:55.1851081Z note: we would appreciate a bug report: ***/blob/master/CONTRIBUTING.md#bug-reports
2019-11-29T09:44:55.1851399Z note: rustc 1.41.0-dev running on x86_64-unknown-linux-gnu
2019-11-29T09:44:55.1851435Z 
2019-11-29T09:44:55.1851435Z 
2019-11-29T09:44:55.1851881Z note: compiler flags: -Z external-macro-backtrace -Z unstable-options -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C opt-level=2 -C debuginfo=0 -C link-args=-Wl,-rpath,$ORIGIN/../lib -C prefer-dynamic -C debug-assertions=n --crate-type lib
2019-11-29T09:44:55.1851984Z note: some of the compiler flags provided by cargo are hidden
2019-11-29T09:44:55.1852033Z 
2019-11-29T09:44:55.1956428Z error: could not compile `crossbeam-utils`.
2019-11-29T09:44:55.1978604Z warning: build failed, waiting for other jobs to finish...
---
2019-11-29T09:44:58.8754999Z   local time: Fri Nov 29 09:44:58 UTC 2019
2019-11-29T09:44:59.4102659Z   network time: Fri, 29 Nov 2019 09:44:59 GMT
2019-11-29T09:44:59.4105204Z == end clock drift check ==
2019-11-29T09:45:00.6407728Z 
2019-11-29T09:45:00.6508028Z ##[error]Bash exited with code '1'.
2019-11-29T09:45:00.6545031Z ##[section]Starting: Checkout
2019-11-29T09:45:00.6546792Z ==============================================================================
2019-11-29T09:45:00.6546852Z Task         : Get sources
2019-11-29T09:45:00.6546901Z 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)

@osa1

This comment was marked as resolved.

Copy link
Contributor Author

osa1 commented Nov 29, 2019

Hmm, it seems like enclosing_breakables is borrowed mutably for longer that it should be. I'll fix.

@osa1 osa1 force-pushed the osa1:fix_66702 branch 2 times, most recently from 729b992 to f8d5786 Nov 29, 2019
@osa1

This comment has been minimized.

Copy link
Contributor Author

osa1 commented Nov 29, 2019

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

This comment has been minimized.

Copy link
Member

cramertj commented Dec 2, 2019

r=me with @Centril's nit fixed.

@osa1 osa1 force-pushed the osa1:fix_66702 branch from f8d5786 to 06f8585 Dec 3, 2019
@osa1

This comment has been minimized.

Copy link
Contributor Author

osa1 commented Dec 3, 2019

Test renamed.

@Centril

This comment has been minimized.

Copy link
Member

Centril commented Dec 3, 2019

@bors r=cramertj

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 3, 2019

📌 Commit 06f8585 has been approved by cramertj

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Dec 3, 2019

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

This comment has been minimized.

Copy link
Member

Centril commented Dec 3, 2019

@bors r- ^

@osa1

This comment has been minimized.

Copy link
Contributor Author

osa1 commented Dec 3, 2019

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

@osa1 osa1 force-pushed the osa1:fix_66702 branch from 06f8585 to 6857c93 Dec 3, 2019
@osa1

This comment has been minimized.

Copy link
Contributor Author

osa1 commented Dec 3, 2019

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

@cramertj

This comment has been minimized.

Copy link
Member

cramertj commented Dec 3, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 3, 2019

📌 Commit 6857c93 has been approved by cramertj

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
4 checks passed
4 checks passed
pr #20191203.23 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 (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
@osa1 osa1 deleted the osa1:fix_66702 branch Dec 6, 2019
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.