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

Stabilize allow irrefutable if-let patterns #55639

Closed
wants to merge 11 commits into from
Closed

Stabilize allow irrefutable if-let patterns #55639

wants to merge 11 commits into from

Conversation

Nokel81
Copy link
Contributor

@Nokel81 Nokel81 commented Nov 3, 2018

This PR is for the stabilization of RFC 2086

@rust-highfive
Copy link
Collaborator

r? @oli-obk

(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 3, 2018
Copy link
Contributor

@Centril Centril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems mostly good; But I'd also like tests ensuring that #[allow(...)] and #[deny(...)] to the right thing...


#[deny(irrefutable_let_patterns)]
fn main() {
if let _ = 5 {
Copy link
Contributor

@Centril Centril Nov 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put an error check ~ error: irrefutable if-let pattern or so here so that the test is more robust.

@rust-lang rust-lang deleted a comment from rust-highfive Nov 9, 2018
@Centril
Copy link
Contributor

Centril commented Nov 9, 2018

r? @estebank

@rust-highfive rust-highfive assigned estebank and unassigned oli-obk Nov 9, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (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.
travis_time:end:340e1718:start=1541803341382906177,finish=1541803425480490026,duration=84097583849
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-5.0
---
[00:53:24] .................................................................................................... 100/5000
[00:53:27] .................................................................................................... 200/5000
[00:53:30] ........................................................................ii...................ii..... 300/5000
[00:53:33] ...........................................................................................iii...... 400/5000
[00:53:35] ..iiiiiiii.iii...........................iii...........................................i...........i 500/5000
[00:53:43] .................................................................................................... 700/5000
[00:53:49] .....................................................................i...........i.................. 800/5000
[00:53:52] ........................................................................................iiiii....... 900/5000
[00:53:56] ............iiiiii.................................................................................. 1000/5000
---
[00:54:32] .................................................................................................... 2200/5000
[00:54:36] .................................................................................................... 2300/5000
[00:54:40] .................................................................................................... 2400/5000
[00:54:44] .................................................................................................... 2500/5000
[00:54:47] .................................................................iiiiiiiii.......................... 2600/5000
[00:54:54] .............................ii..................................................................... 2800/5000
[00:54:57] .................................................................................................... 2900/5000
[00:55:01] .................................................................................................... 3000/5000
[00:55:04] ........................i........................................................................... 3100/5000
---
travis_time:start:test_codegen
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:09:23] 
[01:09:23] running 115 tests
[01:09:26] i..ii...iii..iii.....i...i.........i..iii...........i.....i.....ii...i..i.ii..............i...ii..ii 100/115
[01:09:27] .i....iiii.....
[01:09:27] 
[01:09:27]  finished in 3.558
[01:09:27] travis_fold:end:test_codegen

---
travis_time:start:test_debuginfo
Check compiletest suite=debuginfo mode=debuginfo-both (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:09:41] 
[01:09:41] running 118 tests
[01:10:04] .iiiii...i.....i..i...i..i.i..i.i..i.....i..i....i..........iiii.........i.i....i...i.......ii.i.i.i 100/118
[01:10:08] ......iii.i.....ii
[01:10:08] 
[01:10:08]  finished in 26.711
[01:10:08] travis_fold:end:test_debuginfo

---
[01:42:20] 
[01:42:20] failures:
[01:42:20] 
[01:42:20] ---- /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0162 (line 2802) stdout ----
[01:42:20] warning: irrefutable if-let pattern
[01:42:20]   --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:2807:1
[01:42:20]    |
[01:42:20] 7  | / if let Irrefutable(x) = irr {
[01:42:20] 8  | |     // This body will always be executed.
[01:42:20] 9  | |     // ...
[01:42:20]    | |_^
[01:42:20]    |
[01:42:20]    |
[01:42:20]    = note: #[warn(irrefutable_let_patterns)] on by default
[01:42:20] 
[01:42:20] thread '/checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0162 (line 2802)' panicked at 'test compiled while it wasn't supposed to', librustdoc/test.rs:313:13
[01:42:20] 
[01:42:20] ---- /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0165 (line 2856) stdout ----
[01:42:20] warning: irrefutable while-let pattern
[01:42:20]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:2861:1
[01:42:20]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:2861:1
[01:42:20]   |
[01:42:20] 7 | / while let Irrefutable(x) = irr {
[01:42:20] 8 | |     // ...
[01:42:20]   | |_^
[01:42:20]   |
[01:42:20]   |
[01:42:20]   = note: #[warn(irrefutable_let_patterns)] on by default
[01:42:20] 
[01:42:20] thread '/checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0165 (line 2856)' panicked at 'test compiled while it wasn't supposed to', librustdoc/test.rs:313:13
[01:42:20] 
[01:42:20] failures:
[01:42:20]     /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0162 (line 2802)
[01:42:20]     /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0165 (line 2856)
---
[01:42:20] 
[01:42:20] 
[01:42:20] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:42:20] Build completed unsuccessfully in 0:52:48
[01:42:20] make: *** [check] Error 1
[01:42:20] Makefile:58: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0eb67535
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Sat Nov 10 00:26:16 UTC 2018

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)

@estebank
Copy link
Contributor

Also, please keep the commit log clean of merges. Rebase on top of latest master instead.

@Mark-Simulacrum Mark-Simulacrum 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-review Status: Awaiting review from the assignee but also interested parties. labels Nov 15, 2018
@Mark-Simulacrum
Copy link
Member

@Nokel81 Can you resolve @estebank's comments here and fix the CI failure?

@Nokel81
Copy link
Contributor Author

Nokel81 commented Nov 15, 2018

I should be able to do it.

@Nokel81
Copy link
Contributor Author

Nokel81 commented Nov 17, 2018

@estebank I am trying to implement your recommendations (including the rebase which doesn't seem to have gone very well) but I am getting compiling panics locally with build std v0.0.0 so I need to look into that

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (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.
travis_time:end:044c472c:start=1542422760185936867,finish=1542422818761646237,duration=58575709370
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-5.0
---
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/a6/da/c99b10bfc509cbbea520886d2e8fe0e738e3ce22e2f528381f3bb2229433/awscli-1.16.57-py2.py3-none-any.whl (1.4MB)
    0% |▎                               | 10kB 16.0MB/s eta 0:00:01
    1% |▌                               | 20kB 1.9MB/s eta 0:00:01
    2% |▊                               | 30kB 2.2MB/s eta 0:00:01
    2% |█                               | 40kB 2.0MB/s eta 0:00:01
---
[00:49:44] .................................................................................................... 100/5019
[00:49:47] .................................................................................................... 200/5019
[00:49:50] .............................ii............................................ii...................ii.. 300/5019
[00:49:53] ..............................................................................................iii... 400/5019
[00:49:55] .....iiiiiiii.iii............................iii...........................................i........ 500/5019
[00:50:02] .................................................................................................... 700/5019
[00:50:07] .................................................................................i...........i...... 800/5019
[00:50:10] .................................................................................................... 900/5019
[00:50:13] iiiii..................ii.iiii...................................................................... 1000/5019
---
[00:50:48] .................................................................................................... 2200/5019
[00:50:52] .................................................................................................... 2300/5019
[00:50:56] .................................................................................................... 2400/5019
[00:51:00] .................................................................................................... 2500/5019
[00:51:03] ..............................................................................iiiiiiiii............. 2600/5019
[00:51:10] ............................................ii...................................................... 2800/5019
[00:51:13] .................................................................................................... 2900/5019
[00:51:17] .................................................................................................... 3000/5019
[00:51:20] .......................................i............................................................ 3100/5019
---
travis_time:start:test_codegen
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:04:54] 
[01:04:54] running 116 tests
[01:04:57] i..ii....iii.iiii.....i...i.........i..iii...........i.....i.....ii...i..i.ii..............i...ii..i 100/116
[01:04:57] i.i....iiii.....
[01:04:57] 
[01:04:57]  finished in 3.457
[01:04:57] travis_fold:end:test_codegen

---
travis_time:start:test_debuginfo
Check compiletest suite=debuginfo mode=debuginfo-both (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:05:11] 
[01:05:11] running 118 tests
[01:05:36] .iiiii...i.....i..i...i..i.i..i.i..i.....i..i....i..........iiii.........i.i....i...i.......ii.i.i.i 100/118
[01:05:40] ......iii.i.....ii
[01:05:40] 
[01:05:40]  finished in 28.568
[01:05:40] travis_fold:end:test_debuginfo

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)

@estebank
Copy link
Contributor

You will need to fix the rebase. It seems like your best choice at this point might be to just compare against your local master to get the appropriate changes, as it might be easier to do correctly. Alternatively, you can try following https://medium.com/@jeffreymmeyers/recovering-a-bad-git-rebase-with-git-reflog-e6ddedf02329.

You will also have to update the E0162 error cases and text in the index at test/error-index.md - Rust_Compiler_Error_Index::E0162 (line 2802) and test/error-index.md - Rust_Compiler_Error_Index::E0165 (line 2856), as it is no longer an error.

@bors
Copy link
Contributor

bors commented Nov 21, 2018

☔ The latest upstream changes (presumably #56032) made this pull request unmergeable. Please resolve the merge conflicts.

@Centril Centril added the relnotes Marks issues that should be documented in the release notes of the next release. label Nov 22, 2018
@TimNN
Copy link
Contributor

TimNN commented Nov 27, 2018

Ping from triage @Nokel81: It looks like your PR needs to be rebased.

@Centril
Copy link
Contributor

Centril commented Nov 30, 2018

Hey @Nokel81; do you think you can get this into a ready state by Monday (2018-12-03)?

@Nokel81
Copy link
Contributor Author

Nokel81 commented Nov 30, 2018

@Centril I think I will be able to.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (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.
travis_time:end:03744f28:start=1543813647748471347,finish=1543813708883239185,duration=61134767838
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-5.0
---
travis_time:start:test_codegen
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:58:51] 
[00:58:51] running 119 tests
[00:58:54] i..ii...iii..iiii.....i...i.........i..iii.............i.....i.....ii...i..i.ii..............i...ii. 100/119
[00:58:55] .ii.i.....iii.i....
[00:58:55] 
[00:58:55]  finished in 3.636
[00:58:55] travis_fold:end:test_codegen

---
travis_time:start:test_debuginfo
Check compiletest suite=debuginfo mode=debuginfo-both (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:59:11] 
[00:59:11] running 118 tests
[00:59:36] .iiiii...i.....i..i...i..i.i..i.i..i.....i..i....i..........iiii.........i.i....i...i.......ii.i.i.i 100/118
[00:59:40] ......iii.i.....ii
[00:59:40] 
[00:59:40]  finished in 29.669
[00:59:40] travis_fold:end:test_debuginfo

---
[01:27:02] 
[01:27:02] failures:
[01:27:02] 
[01:27:02] ---- /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0162 (line 2802) stdout ----
[01:27:02] warning: irrefutable if-let pattern
[01:27:02]   --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:2807:1
[01:27:02]    |
[01:27:02] 7  | / if let Irrefutable(x) = irr {
[01:27:02] 8  | |     // This body will always be executed.
[01:27:02] 9  | |     // ...
[01:27:02]    | |_^
[01:27:02]    |
[01:27:02]    |
[01:27:02]    = note: #[warn(irrefutable_let_patterns)] on by default
[01:27:02] 
[01:27:02] thread '/checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0162 (line 2802)' panicked at 'test compiled while it wasn't supposed to', src/librustdoc/test.rs:313:13
[01:27:02] 
[01:27:02] ---- /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0165 (line 2856) stdout ----
[01:27:02] warning: irrefutable while-let pattern
[01:27:02]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:2861:1
[01:27:02]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:2861:1
[01:27:02]   |
[01:27:02] 7 | / while let Irrefutable(x) = irr {
[01:27:02] 8 | |     // ...
[01:27:02]   | |_^
[01:27:02]   |
[01:27:02]   |
[01:27:02]   = note: #[warn(irrefutable_let_patterns)] on by default
0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib
58684 ./obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/release/deps
56896 ./src/llvm/test/MC
56108 ./obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/release/build

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, 2018

cc @eddyb, can you help out here?

@oli-obk
Copy link
Contributor

oli-obk commented Dec 3, 2018

You're seeing doctest failures in

if let Irrefutable(x) = irr {
and
while let Irrefutable(x) = irr {

@eddyb
Copy link
Member

eddyb commented Dec 3, 2018

@Nokel81 Search for the error codes, error-index.md is automatically generated from compiler sources.

@estebank estebank changed the title Stabalize allow irrefutable if-let patterns Stabilize allow irrefutable if-let patterns Dec 3, 2018
@Nokel81
Copy link
Contributor Author

Nokel81 commented Dec 3, 2018

I will do a rebase later today

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (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.
travis_time:end:07c7dcbb:start=1544049006852761337,finish=1544049062919999888,duration=56067238551
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-5.0
---
[00:55:20] .................................................................................................... 3900/5107
[00:55:26] .................................................................................................... 4000/5107
[00:55:31] .................................................................................................... 4100/5107
[00:55:34] .................................................................................................... 4200/5107
[00:55:38] .......................................................................................i...FF....... 4300/5107
[00:55:47] .................................................................................................... 4500/5107
[00:55:50] .................................................................................................... 4600/5107
[00:55:54] ......................................................................i............................. 4700/5107
[00:55:57] .................................................................................................... 4800/5107
---
travis_time:end:0c843890:start=1544052440603523392,finish=1544052440608346651,duration=4823259
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:2687615f
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|

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)

@bors
Copy link
Contributor

bors commented Dec 6, 2018

☔ The latest upstream changes (presumably #56557) made this pull request unmergeable. Please resolve the merge conflicts.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (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.
travis_time:end:0bc21be6:start=1544392956406655733,finish=1544393014420938011,duration=58014282278
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-5.0
---
[00:47:55] .................................................................................................... 4000/5165
[00:48:02] .................................................................................................... 4100/5165
[00:48:05] .................................................................................................... 4200/5165
[00:48:08] .................................................................................................... 4300/5165
[00:48:12] ..................................i...F.F........................................................... 4400/5165
[00:48:20] .................................................................................................... 4600/5165
[00:48:23] .................................................................................................... 4700/5165
[00:48:27] .....................i.............................................................................. 4800/5165
[00:48:30] .................................................................................................... 4900/5165

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)

@estebank
Copy link
Contributor

estebank commented Dec 9, 2018

  1. Remove the merge commit and rebase against latest master

  2. You need to fix the following test failure:


[00:56:06] failures:
[00:56:06] 
[00:56:06] ---- [ui] ui/rfc-2086-irrefutable_let_patterns/deny-irrefutable-if-let.rs stdout ----
[00:56:06] 
[00:56:06] error: /checkout/src/test/ui/rfc-2086-irrefutable_let_patterns/deny-irrefutable-if-let.rs:13: unexpected error: '13:5: 15:6: irrefutable if-let pattern [irrefutable_let_patterns]'
[00:56:06] 
[00:56:06] error: 1 unexpected errors found, 0 expected errors not found
[00:56:06] status: exit code: 1
[00:56:06] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/rfc-2086-irrefutable_let_patterns/deny-irrefutable-if-let.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfc-2086-irrefutable_let_patterns/deny-irrefutable-if-let/a" "-Crpath" "-O" "-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/rfc-2086-irrefutable_let_patterns/deny-irrefutable-if-let/auxiliary" "-A" "unused"
[00:56:06] unexpected errors (from JSON output): [
[00:56:06]     Error {
[00:56:06]         line_num: 13,
[00:56:06]         kind: Some(
[00:56:06]             Error
[00:56:06]         ),
[00:56:06]         msg: "13:5: 15:6: irrefutable if-let pattern [irrefutable_let_patterns]"
[00:56:06]     }
[00:56:06] ]
[00:56:06] 
[00:56:06] thread '[ui] ui/rfc-2086-irrefutable_let_patterns/deny-irrefutable-if-let.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:1358:13
[00:56:06] 
[00:56:06] ---- [ui] ui/rfc-2086-irrefutable_let_patterns/deny-irrefutable-while-let.rs stdout ----
[00:56:06] 
[00:56:06] error: /checkout/src/test/ui/rfc-2086-irrefutable_let_patterns/deny-irrefutable-while-let.rs:13: unexpected error: '13:5: 15:6: irrefutable while-let pattern [irrefutable_let_patterns]'
[00:56:06] 
[00:56:06] error: 1 unexpected errors found, 0 expected errors not found
[00:56:06] status: exit code: 1
[00:56:06] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/rfc-2086-irrefutable_let_patterns/deny-irrefutable-while-let.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfc-2086-irrefutable_let_patterns/deny-irrefutable-while-let/a" "-Crpath" "-O" "-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/rfc-2086-irrefutable_let_patterns/deny-irrefutable-while-let/auxiliary" "-A" "unused"
[00:56:06] unexpected errors (from JSON output): [
[00:56:06]     Error {
[00:56:06]         line_num: 13,
[00:56:06]         kind: Some(
[00:56:06]             Error
[00:56:06]         ),
[00:56:06]         msg: "13:5: 15:6: irrefutable while-let pattern [irrefutable_let_patterns]"
[00:56:06]     }
[00:56:06] ]
[00:56:06] 
[00:56:06] thread '[ui] ui/rfc-2086-irrefutable_let_patterns/deny-irrefutable-while-let.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:1358:13
[00:56:06] 
[00:56:06] 
[00:56:06] failures:
[00:56:06]     [ui] ui/rfc-2086-irrefutable_let_patterns/deny-irrefutable-if-let.rs
[00:56:06]     [ui] ui/rfc-2086-irrefutable_let_patterns/deny-irrefutable-while-let.rs
[00:56:06] 
[00:56:06] test result: FAILED. 5081 passed; 2 failed; 24 ignored; 0 measured; 0 filtered out

@@ -686,6 +683,9 @@ declare_features! (
(accepted, extern_crate_item_prelude, "1.31.0", Some(55599), None),
// Allows use of the `:literal` macro fragment specifier (RFC 1576).
(accepted, macro_literal_matcher, "1.31.0", Some(35625), None),
// Allows irrefutable patterns in if-let and while-let statements (RFC 2086)
(accepted, irrefutable_let_patterns, "1.32.0", Some(44495), None),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(accepted, irrefutable_let_patterns, "1.32.0", Some(44495), None),
(accepted, irrefutable_let_patterns, "1.33.0", Some(44495), None),

It slipped so you'll have to bump the version.

@bors
Copy link
Contributor

bors commented Dec 23, 2018

☔ The latest upstream changes (presumably #57063) made this pull request unmergeable. Please resolve the merge conflicts.

@Dylan-DPC-zz
Copy link

ping from triage @Nokel81 you need to address the changes requested and the conflicts

@Dylan-DPC-zz Dylan-DPC-zz reopened this Jan 7, 2019
@Centril Centril added the T-lang Relevant to the language team, which will review and decide on the PR/issue. label Jan 10, 2019
@varkor
Copy link
Member

varkor commented Jan 12, 2019

I've opened #57535 to stabilise if-let patterns, as we want to get it in before the beta cut-off. Thanks for your work, @Nokel81! You're a coauthor on the change, so your work didn't go to waste.

@Nokel81
Copy link
Contributor Author

Nokel81 commented Jan 12, 2019 via email

Centril added a commit to Centril/rust that referenced this pull request Jan 12, 2019
…rns, r=Centril

Stabilise irrefutable if-let and while-let patterns

This stabilises RFC 2086 (rust-lang#44495).

This replaces rust-lang#55639, as we want to stabilise this in time for the beta cut-off.

Closes rust-lang#55639.

r? @Centril
@varkor varkor closed this Jan 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.