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

Stabilise exhaustive integer patterns #56362

Closed
wants to merge 1 commit into
base: master
from

Conversation

@varkor
Copy link
Member

varkor commented Nov 30, 2018

Edit: This was merged in #56557. This now just contains a fix for 16-bit pointer sizes.

This is dependent on the FCP for rust-lang/rfcs#2591 being completed, but that should happen tomorrow, so there's little harm in opening this PR early.

Closes #50907.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Nov 30, 2018

r? @estebank

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

@rust-highfive

This comment was marked as outdated.

Copy link
Collaborator

rust-highfive commented Nov 30, 2018

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:1cbb84b2:start=1543538865430191911,finish=1543538866509853676,duration=1079661765
$ 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:tidy
tidy check
[00:03:01] * 568 error codes
[00:03:01] * highest error code: E0721
[00:03:02] Expected a gate test for the feature 'exhaustive_patterns'.
[00:03:02] Hint: create a failing test file named 'feature-gate-exhaustive_patterns.rs'
[00:03:02]       in the 'ui' test suite, with its failures due to
[00:03:02]       missing usage of #![feature(exhaustive_patterns)].
[00:03:02] Hint: If you already have such a test and don't want to rename it,
[00:03:02]       you can also add a // gate-test-exhaustive_patterns line to the test file.
[00:03:02] tidy error: Found 1 features without a gate test.
[00:03:02] some tidy checks failed
[00:03:02] 
[00:03:02] 
[00:03:02] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:03:02] 
[00:03:02] 
[00:03:02] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:03:02] Build completed unsuccessfully in 0:00:55
[00:03:02] Build completed unsuccessfully in 0:00:55
[00:03:02] make: *** [tidy] Error 1
[00:03:02] Makefile:79: recipe for target 'tidy' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0ca40a33
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Fri Nov 30 00:50:58 UTC 2018
---
travis_time:end:05b667c3:start=1543539058873865587,finish=1543539058878265765,duration=4400178
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:01a93cb2
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:076e8ce4
travis_time:start:076e8ce4
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:00ed7206
$ dmesg | grep -i kill

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 Centril added the relnotes label Nov 30, 2018

@varkor varkor force-pushed the varkor:stabilise-exhaustive-integer-patterns branch from dd0f6c7 to e018268 Nov 30, 2018

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Nov 30, 2018

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:09dccf79:start=1543574570820444856,finish=1543574634500793578,duration=63680348722
$ 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:48:28] .................................................................................................... 400/5104
[00:48:31] .................................................................................................... 500/5104
[00:48:35] .............................i...................................................................... 600/5104
[00:48:38] .................................................................................................... 700/5104
[00:48:44] ..........................................FFF.F.................................................i... 800/5104
[00:48:52] ...................iiiii............................................................................ 1000/5104
[00:48:54] .................................................................................................... 1100/5104
[00:48:56] .................................................................................................... 1200/5104
[00:48:56] .................................................................................................... 1200/5104
[00:48:59] .........................................................................................F.......... 1300/5104
[00:49:01] .....................................................F.............................................. 1400/5104
[00:49:04] .................................................................................................... 1500/5104
[00:49:07] ...................F...i....................................................................i....... 1600/5104
[00:49:14] .................................................................................................... 1800/5104
[00:49:17] .................................................................................................... 1900/5104
[00:49:20] ................................i................................................................... 2000/5104
[00:49:24] .................................................................................................... 2100/5104
---
[00:49:51] .................................................................................................... 2800/5104
[00:49:54] .................................................................................................... 2900/5104
[00:49:58] .................................................................................................... 3000/5104
[00:50:01] ..........................................................................i......................... 3100/5104
[00:50:04] .................................................F.....F............................................ 3200/5104
[00:50:12] .................................................................................................... 3400/5104
[00:50:15] .................................................................................................... 3500/5104
[00:50:15] .................................................................................................... 3500/5104
[00:50:18] .................Fii................................................................................ 3600/5104
[00:50:21] ............................................................................................i....... 3800/5104
[00:50:22] .................................................................................................... 3900/5104
[00:50:30] .................................................................................................... 4000/5104
[00:50:30] .................................................................................................... 4000/5104
[00:50:33] ........................................................F........................................... 4100/5104
[00:50:39] ....................................................................................i............... 4300/5104
[00:50:45] .................................................................................................... 4400/5104
[00:50:48] .................................................................................................... 4500/5104
[00:50:52] .................................................................................................... 4600/5104
[00:50:52] .................................................................................................... 4600/5104
[00:50:56] ...................................................................i................................ 4700/5104
[00:50:59] .................................................................................................... 4800/5104
[00:51:02] .................................................................................................... 4900/5104
[00:51:05] .................................................................................................... 5000/5104
.rs:35:15
[00:51:08] 3    |
[00:51:08] 4 LL |     A = { let 0 = 0; 0 },
[00:51:08] 
[00:51:08] -    |               ^ pattern `_` not covered
[00:51:08] +    |               ^ pattern `-2147483648i32..=-1i32` not covered
[00:51:08] 7 error: aborting due to previous error
[00:51:08] 8 
[00:51:08] 
[00:51:08] 
[00:51:08] 
[00:51:08] The actual stderr differed from the expected stderr.
[00:51:08] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-match-check.eval1/const-match-check.eval1.stderr
[00:51:08] To update references, rerun the tests and pass the `--bless` flag
[00:51:08] To only update this specific test, also pass `--test-args consts/const-match-check.rs`
[00:51:08] 
[00:51:08] error in revision `eval1`: 1 errors occurred comparing output.
[00:51:08] status: exit code: 1
[00:51:08] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/const-match-check.rs" "--target=x86_64-unknown-linux-gnu" "--cfg" "eval1" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-match-check.eval1/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/consts/const-match-check.eval1/auxiliary" "-A" "unused"
[00:51:08] ------------------------------------------
[00:51:08] 
[00:51:08] ------------------------------------------
[00:51:08] stderr:
[00:51:08] stderr:
[00:51:08] ------------------------------------------
[00:51:08] {"message":"refutable pattern in local binding: `-2147483648i32..=-1i32` not covered","code":{"code":"E0005","explanation":"\nPatterns used to bind names must be irrefutable, that is, they must guarantee\nthat a name will be extracted in all cases. Erroneous code example:\n\n```compile_fail,E0005\nlet x = Some(1);\nlet Some(y) = x;\n// error: refutable pattern in local binding: `None` not covered\n```\n\nIf you encounter this error you probably need to use a `match` or `if let` to\ndeal with the possibility of failure. Example:\n\n```\nlet x = Some(1);\n\nmatch x {\n    Some(y) => {\n        // do something\n    },\n    None => {}\n}\n\n// or:\n\nif let Some(y) = x {\n    // do something\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/const-match-check.rs","byte_start":1012,"byte_end":1013,"line_start":35,"line_end":35,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":"    A = { let 0 = 0; 0 },","highlight_start":15,"highlight_end":16}],"label":"pattern `-2147483648i32..=-1i32` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0005]: refutable pattern in local binding: `-2147483648i32..=-1i32` not covered\n  --> /checkout/src/test/ui/consts/const-match-check.rs:35:15\n   |\nLL |     A = { let 0 = 0; 0 },\n   |               ^ pattern `-2147483648i32..=-1i32` not covered\n\n"}
[00:51:08] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:51:08] {"message":"For more information about this error, try `rustc --explain E0005`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0005`.\n"}
[00:51:08] ------------------------------------------
[00:51:08] 
[00:51:08] thread '[ui] ui/consts/const-match-check.rs#eval1' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:51:08] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:51:08] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:51:08] 
[00:51:08] ---- [ui] ui/consts/const-match-check.rs#eval2 stdout ----
[00:51:08] diff of stderr:
[00:51:08] 
[00:51:08] - error[E0005]: refutable pattern in local binding: `_` not covered
[00:51:08] + error[E0005]: refutable pattern in local binding: `-2147483648i32..=-1i32` not covered
[00:51:08] 3    |
[00:51:08] 3    |
[00:51:08] 4 LL |     let x: [i32; { let 0 = 0; 0 }] = [];
[00:51:08] 
[00:51:08] -    |                        ^ pattern `_` not covered
[00:51:08] +    |                        ^ pattern `-2147483648i32..=-1i32` not covered
[00:51:08] 7 error: aborting due to previous error
[00:51:08] 8 
[00:51:08] 
[00:51:08] 
[00:51:08] 
[00:51:08] The actual stderr differed from the expected stderr.
[00:51:08] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-match-check.eval2/const-match-check.eval2.stderr
[00:51:08] To update references, rerun the tests and pass the `--bless` flag
[00:51:08] To only update this specific test, also pass `--test-args consts/const-match-check.rs`
[00:51:08] 
[00:51:08] error in revision `eval2`: 1 errors occurred comparing output.
[00:51:08] status: exit code: 1
[00:51:08] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/const-match-check.rs" "--target=x86_64-unknown-linux-gnu" "--cfg" "eval2" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-match-check.eval2/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/consts/const-match-check.eval2/auxiliary" "-A" "unused"
[00:51:08] ------------------------------------------
[00:51:08] 
[00:51:08] ------------------------------------------
[00:51:08] stderr:
[00:51:08] stderr:
[00:51:08] ------------------------------------------
[00:51:08] {"message":"refutable pattern in local binding: `-2147483648i32..=-1i32` not covered","code":{"code":"E0005","explanation":"\nPatterns used to bind names must be irrefutable, that is, they must guarantee\nthat a name will be extracted in all cases. Erroneous code example:\n\n```compile_fail,E0005\nlet x = Some(1);\nlet Some(y) = x;\n// error: refutable pattern in local binding: `None` not covered\n```\n\nIf you encounter this error you probably need to use a `match` or `if let` to\ndeal with the possibility of failure. Example:\n\n```\nlet x = Some(1);\n\nmatch x {\n    Some(y) => {\n        // do something\n    },\n    None => {}\n}\n\n// or:\n\nif let Some(y) = x {\n    // do something\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/const-match-check.rs","byte_start":1137,"byte_end":1138,et 0 = 0; 0 };
[00:51:08] 
[00:51:08] -    |                      ^ pattern `_` not covered
[00:51:08] +    |                      ^ pattern `-2147483648i32..=-1i32` not covered
[00:51:08] 6 
[00:51:08] - error[E0005]: refutable pattern in local binding: `_` not covered
[00:51:08] + error[E0005]: refutable pattern in local binding: `-2147483648i32..=-1i32` not covered
[00:51:08] 9    |
[00:51:08] 9    |
[00:51:08] 10 LL | static Y: i32 = { let 0 = 0; 0 };
[00:51:08] 
[00:51:08] -    |                       ^ pattern `_` not covered
[00:51:08] +    |                       ^ pattern `-2147483648i32..=-1i32` not covered
[00:51:08] 12 
[00:51:08] - error[E0005]: refutable pattern in local binding: `_` not covered
[00:51:08] + error[E0005]: refutable pattern in local binding: `-2147483648i32..=-1i32` not covered
[00:51:08] 15    |
[00:51:08] 15    |
[00:51:08] 16 LL |     const X: i32 = { let 0 = 0; 0 };
[00:51:08] 
[00:51:08] -    |                          ^ pattern `_` not covered
[00:51:08] +    |                          ^ pattern `-2147483648i32..=-1i32` not covered
[00:51:08] 18 
[00:51:08] - error[E0005]: refutable pattern in local binding: `_` not covered
[00:51:08] + error[E0005]: refutable pattern in local binding: `-2147483648i32..=-1i32` not covered
[00:51:08] 21    |
[00:51:08] 21    |
[00:51:08] 22 LL |     const X: i32 = { let 0 = 0; 0 };
[00:51:08] 
[00:51:08] -    |                          ^ pattern `_` not covered
[00:51:08] +    |                          ^ pattern `-2147483648i32..=-1i32` not covered
[00:51:08] 25 error: aborting due to 4 previous errors
[00:51:08] 26 
[00:51:08] 
[00:51:08] 
[00:51:08] 
[00:51:08] The actual stderr differed from the expected stderr.
[00:51:08] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-match-check.matchck/const-match-check.matchck.stderr
[00:51:08] To update references, rerun the tests and pass the `--bless` flag
[00:51:08] To only update this specific test, also pass `--test-args consts/const-match-check.rs`
[00:51:08] 
[00:51:08] error in revision `matchck`: 1 errors occurred comparing output.
[00:51:08] status: exit code: 1
[00:51:08] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/const-match-check.rs" "--target=x86_64-unknown-linux-gnu" "--cfg" "matchck" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-match-check.matchck/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/consts/const-match-check.matchck/auxiliary" "-A" "unused"
[00:51:08] ------------------------------------------
[00:51:08] 
[00:51:08] ------------------------------------------
[00:51:08] stderr:
[00:51:08] stderr:
[00:51:08] ------------------------------------------
[00:51:08] {"message":"refutable pattern in local binding: `-2147483648i32..=-1i32` not covered","code":{"code":"E0005","explanation":"\nPatterns used to bind names must be irrefutable, that is, they mot covered\n```\n\nIf you encounter this error you probably need to use a `match` or `if let` to\ndeal with the possibility of failure. Example:\n\n```\nlet x = Some(1);\n\nmatch x {\n    Some(y) => {\n        // do something\n    },\n    None => {}\n}\n\n// or:\n\nif let Some(y) = x {\n    // do something\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/const-match-check.rs","byte_start":645,"byte_end":646,"line_start":18,"line_end":18,"column_start":23,"column_end":24,"is_primary":true,"text":[{"text":"static Y: i32 = { let 0 = 0; 0 };","highlight_start":23,"highlight_end":24}],"label":"pattern `-2147483648i32..=-1i32` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0005]: refutable pattern in local binding: `-2147483648i32..=-1i32` not covered\n  --> /checkout/src/test/ui/consts/const-match-check.rs:18:23\n   |\nLL | static Y: i32 = { let 0 = 0; 0 };\n   |                       ^ pattern `-2147483648i32..=-1i32` not covered\n\n"}
[00:51:08] {"message":"refutable pattern in local binding: `-2147483648i32..=-1i32` not covered","code":{"code":"E0005","explanation":"\nPatterns used to bind names must be irrefutable, that is, they must guarantee\nthat a name will be extracted in all cases. Erroneous code example:\n\n```compile_fail,E0005\nlet x = Some(1);\nlet Some(y) = x;\n// error: refutable pattern in local binding: `None` not covered\n```\n\nIf you encounter this error you probably need to use a `match` or `if let` to\ndeal with the possibility of failure. Example:\n\n```\nlet x = Some(1);\n\nmatch x {\n    Some(y) [00:51:08] 3    |
[00:51:08] 4 LL |     let a = 4; //~ ERROR refutable pattern in local binding: `_` not covered
[00:51:08] 
[00:51:08] 5    |         ^ interpreted as a constant pattern, not new variable
[00:51:08] 6 
[00:51:08] - error[E0005]: refutable pattern in local binding: `_` not covered
[00:51:08] + error[E0005]: refutable pattern in local binding: `0u8..=1u8` not covered
[00:51:08] 9    |
[00:51:08] 9    |
[00:51:08] 10 LL |     let c = 4; //~ ERROR refutable pattern in local binding: `_` not covered
[00:51:08] 
[00:51:08] 11    |         ^ interpreted as a constant pattern, not new variable
[00:51:08] 12 
[00:51:08] - error[E0005]: refutable pattern in local binding: `_` not covered
[00:51:08] + error[E0005]: refutable pattern in local binding: `0u8..=1u8` not covered
[00:51:08] 15    |
[00:51:08] 15    |
[00:51:08] 16 LL |     let d = 4; //~ ERROR refutable pattern in local binding: `_` not covered
[00:51:08] 
[00:51:08] The actual stderr differed from the expected stderr.
[00:51:08] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-pattern-irrefutable/const-pattern-irrefutable.stderr
[00:51:08] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-pattern-irrefutable/const-pattern-irrefutable.stderr
[00:51:08] To update references, rerun the tests and pass the `--bless` flag
[00:51:08] To only update this specific test, also pass `--test-args consts/const-pattern-irrefutable.rs`
[00:51:08] error: 1 errors occurred comparing output.
[00:51:08] status: exit code: 1
[00:51:08] status: exit code: 1
[00:51:08] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/utable pattern in local binding: `_` not covered","highlight_start":9,"highlight_end":10}],"label":"interpreted as a constant pattern, not new variable","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0005]: refutable pattern in local binding: `0u8..=1u8` not covered\n  --> /checkout/src/test/ui/consts/const-pattern-irrefutable.rs:22:9\n   |\nLL |     let a = 4; //~ ERROR refutable pattern in local binding: `_` not covered\n   |         ^ interpreted as a constant pattern, not new variable\n\n"}
[00:51:08] {"message":"refutable pattern in local binding: `0u8..=1u8` not covered","code":{"code":"E0005","explanation":"\nPatterns used to bind names must be irrefutable, that is, they must guarantee\nthat a name will be extracted in all cases. Erroneous code example:\n\n```compile_fail,E0005\nlet x = Some(1);\nlet Some(y) = x;\n// error: refutable pattern in local binding: `None` not covered\n```\n\nIf you encounter this error you probably need to use a `match` or `if let` to\ndeal with the possibility of failure. Example:\n\n```\nlet x = Some(1);\n\nmatch x {\n    Some(y) => {\n        // do something\n    },\n    None => {}\n}\n\n// or:\n\nif let Some(y) = x {\n    // do something\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/const-pattern-irrefutable.rs","byte_start":675,"byte_end":676,"line_start":23,"line_end":23,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":"    let c = 4; //~ ERROR refutable pattern in local binding: `_` not covered","highlight_start":9,"highlight_end":10}],"label":"interpreted as a consta^
[00:51:08] 12 
[00:51:08] 12 
[00:51:08] 13 error[E0004]: non-exhaustive patterns: `128u8..=255u8` not covered
[00:51:08] -   --> $DIR/exhaustive_integer_patterns.rs:37:11
[00:51:08] +   --> $DIR/exhaustive_integer_patterns.rs:38:11
[00:51:08] 15    |
[00:51:08] 16 LL |     match x { //~ ERROR non-exhaustive patterns
[00:51:08] 17    |           ^ pattern `128u8..=255u8` not covered
[00:51:08] 18 
[00:51:08] 18 
[00:51:08] 19 error[E0004]: non-exhaustive patterns: `11u8..=19u8`, `31u8..=34u8`, `36u8..=69u8` and 1 more not covered
[00:51:08] -   --> $DIR/exhaustive_integer_patterns.rs:42:11
[00:51:08] +   --> $DIR/exhaustive_integer_patterns.rs:43:11
[00:51:08] 21    |
[00:51:08] 22 LL |     match x { //~ ERROR non-exhaustive patterns
[00:51:08] 23    |           ^ patterns `11u8..=19u8`, `31u8..=34u8`, `36u8..=69u8` and 1 more not covered
[00:51:08] 24 
[00:51:08] 25 error: unreachable pattern
[00:51:08] -   --> $DIR/exhaustive_integer_patterns.rs:53:9
[00:51:08] +   --> $DIR/exhaustive_integer_patterns.rs:54:9
[00:51:08] +   --> $DIR/exhaustive_integer_patterns.rs:54:9
[00:51:08] 27    |
[00:51:08] 28 LL |         -2..=20 => {} //~ ERROR unreachable pattern
[00:51:08] 
[00:51:08] 30 
[00:51:08] 30 
[00:51:08] 31 error[E0004]: non-exhaustive patterns: `-128i8..=-8i8`, `-6i8`, `121i8..=124i8` and 1 more not covered
[00:51:08] -   --> $DIR/exhaustive_integer_patterns.rs:50:11
[00:51:08] +   --> $DIR/exhaustive_integer_patterns.rs:51:11
[00:51:08] 33    |
[00:51:08] 34 LL |     match x { //~ ERROR non-exhaustive patterns
[00:51:08] 35    |           ^ patterns `-128i8..=-8i8`, `-6i8`, `121i8..=124i8` and 1 more not covered
[00:51:08] 36 
[00:51:08] 36 
[00:51:08] 37 error[E0004]: non-exhaustive patterns: `-128i8` not covered
[00:51:08] -   --> $DIR/exhaustive_integer_patterns.rs:99:11
[00:51:08] +   --> $DIR/exhaustive_integer_patterns.rs:100:11
[00:51:08] 39    |
[00:51:08] 40 LL |     match 0i8 { //~ ERROR non-exhaustive patterns
[00:51:08] 41    |           ^^^ pattern `-128i8` not covered
[00:51:08] 42 
[00:51:08] 43 error[E0004]: non-exhaustive patterns: `0i16` not covered
[00:51:08] -   --> $DIR/exhaustive_integer_patterns.rs:107:11
[00:51:08] +   --> $DIR/exhaustive_integer_patterns.rs:108:11
[00:51:08] +   --> $DIR/exhaustive_integer_patterns.rs:108:11
[00:51:08] 45    |
[00:51:08] 46 LL |     match 0i16 { //~ ERROR non-exhaustive patterns
[00:51:08] 47    |           ^^^^ pattern `0i16` not covered
[00:51:08] 48 
[00:51:08] 48 
[00:51:08] 49 error[E0004]: non-exhaustive patterns: `128u8..=255u8` not covered
[00:51:08] -   --> $DIR/exhaustive_integer_patterns.rs:125:11
[00:51:08] +   --> $DIR/exhaustive_integer_patterns.rs:126:11
[00:51:08] 51    |
[00:51:08] 52 LL |     match 0u8 { //~ ERROR non-exhaustive patterns
[00:51:08] 53    |           ^^^ pattern `128u8..=255u8` not covered
[00:51:08] 54 
[00:51:08] 54 
[00:51:08] 55 error[E0004]: non-exhaustive patterns: `(0u8, Some(_))` and `(2u8..=255u8, Some(_))` not covered
[00:51:08] -   --> $DIR/exhaustive_integer_patterns.rs:137:11
[00:51:08] +   --> $DIR/exhaustive_integer_patterns.rs:138:11
[00:51:08] 57    |
[00:51:08] 58 LL |     match (0u8, Some(())) { //~ ERROR non-exhaustive patterns
[00:51:08] 59    |           ^^^^^^^^^^^^^^^ patterns `(0u8, Some(_))` and `(2u8..=255u8, Some(_))` not covered
[00:51:08] 60 
[00:51:08] 60 
[00:51:08] 61 error[E0004]: non-exhaustive patterns: `(126u8..=127u8, false)` not covered
[00:51:08] -   --> $DIR/exhaustive_integer_patterns.rs:142:11
[00:51:08] +   --> $DIR/exhaustive_integer_patterns.rs:143:11
[00:51:08] 63    |
[00:51:08] 64 LL |     match (0u8, true) { //~ ERROR non-exhaustive patterns
[00:51:08] 65    |           ^^^^^^^^^^^ pattern `(126u8..=127u8, false)` not covered
[00:51:08] 66 
[00:51:08] 67 error[E0004]: non-exhaustive patterns: `340282366920938463463374607431768211455u128` not covered
[00:51:08] -   --> $DIR/exhaustive_integer_patterns.rs:162:11
[00:51:08] +   --> $DIR/exhaustive_integer_patterns.rs:163:11
[00:51:08] +   --> $DIR/exhaustive_integer_patterns.rs:163:11
[00:51:08] 69    |
[00:51:08] 70 LL |     match 0u128 { //~ ERROR non-exhaustive patterns
[00:51:08] 71    |           ^^^^^ pattern `340282366920938463463374607431768211455u128` not covered
[00:51:08] 72 
[00:51:08] 72 
[00:51:08] 73 error[E0004]: non-exhaustive patterns: `5u128..=340282366920938463463374607431768211455u128` not covered
[00:51:08] -   --> $DIR/exhaustive_integer_patterns.rs:166:11
[00:51:08] +   --> $DIR/exhaustive_integer_patterns.rs:167:11
[00:51:08] 75    |
[00:51:08] 76 LL |     match 0u128 { //~ ERROR non-exhaustive patterns
[00:51:08] 77    |           ^^^^^ pattern `5u128..=340282366920938463463374607431768211455u128` not covered
[00:51:08] 78 
[00:51:08] 78 
[00:51:08] 79 error[E0004]: non-exhaustive patterns: `0u128..=3u128` not covered
[00:51:08] -   --> $DIR/exhaustive_integer_patterns.rs:170:11
[00:51:08] +   --> $DIR/exhaustive_integer_patterns.rs:171:11
[00:51:08] 81    |
[00:51:08] 82 LL |     match 0u128 { //~ ERROR non-exhaustive patterns
[00:51:08] 83    |           ^^^^^ pattern `0u128..=3u128` not covered
[00:51:08] 
[00:51:08] The actual stderr differed from the expected stderr.
[00:51:08] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/exhaustive_integer_patterns/exhaustive_integer_patterns.stderr
[00:51:08] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/exhaustive_integer_patterns/exhaustive_integer_patterns.stderr
[00:51:08] To update references, rerun the tests and pass the `--bless` flag
[00:51:08] To only update this specific test, also pass `--test-args exhaustive_integer_patterns.rs`
[00:51:08] error: 1 errors occurred comparing output.
[00:51:08] status: exit code: 1
[00:51:08] status: exit code: 1
[00:51:08] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/exhaustive_integer_patterns.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/exhaustive_integer_patterns/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/exhaustive_integer_patterns/auxiliary" "-A" "unused"
[00:51:08] ------------------------------------------
[00:51:08] 
[00:51:08] ------------------------------------------
[00:51:08] stderr:
[00:51:08] stderr:
[00:51:08] ------------------------------------------
[00:51:08] {"message":"unreachable pattern","code":{"code":"unreachable_patterns","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/exhaustive_integer_patterns.rs","byte_start":1004,"byte_end":1007,"line_start":33,"line_end // error: non-exhaustive patterns: `HastaLaVistaBaby` not covered\n    Terminator::TalkToMyHand => {}\n}\n```\n\nIf you encounter this error you must alter your patterns so that every possible\nvalue of the input type is matched. For types with a small number of variants\n(like enums) you should probably cover all cases explicitly. Alternatively, the\nunderscore `_` wildcard pattern can be added after all other patterns to match\n\"anything else\". Example:\n\n```\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    Terminator::HastaLaVistaBaby => {}\n}\n\n// or:\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    _ => {}\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/exhaustive_integer_patterns.rs","byte_start":1123,"byte_end":1124,"line_start":38,"line_end":38,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":"    match x { //~ ERROR non-exhaustive patterns","highlight_start":11,"highlight_end":12}],"label":"pattern `128u8..=255u8` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `128u8..=255u8` not covered\n  --> /checkout/src/test/ui/exhaustive_integer_patterns.rs:38:11\n   |\nLL |     match x { //~ ERROR non-exhaustive patterns\n   |           ^ pattern `128u8..=255u8` not covered\n\n"}
[00:51:08] {"message":"non-exhaustive patterns: `11u8..=19u8`, `31u8..=34u8`, `36u8..=69u8` and 1 more not covered","code":{"code":"E0004","explanation":"\nThis error indicates that the compiler cannot guarantee a matching pattern for\none or more possible inputs to a match expression. Guaranteed matches are\nrequired in order to assign values to match expressions, or alternatively,\ndetermine the flow of execution. Erroneous code example:\n\n```compile_fail,E0004\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x { // error: non-exhaustive patterns: `HastaLaVistaBaby` not covered\n    Terminator::TalkToMyHand => {}\n}\n```\n\nIf you encounter this error you must alter your patterns so that every possible\nvalue of the input type is matched. For types with a small number of variants\n(like enums) you should probably cover all cases explicitly. Alternatively, the\nunderscore `_` wildcard pattern can be added after all other patterns to match\n\"anything else\". Example:\n\n```\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    Terminator::HastaLaVistaBaby => {}\n}\n\n// or:\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    _ => {}\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/exhaustive_integer_patterns.rs","byte_start":1241,"byte_end":1242,"line_start":43,"line_end":43,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":"    match x { //~ ERROR non-exhaustive patterns","highlight_start":11,"highlight_end":12}],"label":"patterns `11u8..=19u8`, `31u8..=34u8`, `36u8..=69u8` and 1 more not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `11u8..=19u8`, `31u8..=34u8`, `36u8..=69u8` and 1 more not covered\n  --> /checkout/src/test/ui/exhaustive_integer_patterns.rs:43:11\n   |\nLL |     match x { //~ ERROR non-exhaustive patterns\n   |           ^ patterns `11u8..=19u8`, `31u8..=34u8`, `36u8..=69u8` and 1 more not covered\n\n"}
[00:51:08] {"message":"unreachable pattern","code":{"code":"unreachable_patterns","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/exhaustive_integer_patterns.rs","byte_start":1489,"byte_end":1496,"line_start":54,"line_end":54,"column_start":9,"column_end":16,"is_primary":true,"text":[{"text":"        -2..=20 => {} //~ ERROR unreachable pattern","highlight_start":9,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unreachable pattern\n  --> /checkout/src/test/ui/exhaustive_integer_patterns.rs:54:9\n   |\nLL |         -2..=20 => {} //~ ERROR unreachable pattern\n   |         ^^^^^^^\n\n"}
[00:51:08] {"message":"non-exhaustive patterns: `-128i8..=-8i8`, `-6i8`, `121i8..=124i8` and 1 more not covered","code":{"code":"E0004","explanation":"\nThis error indicates that the compiler cannot guarantee a matching pattern for\none or more possible inputs to a match expression. Guaranteed matches are\nrequired in order to assign values to match expressions, or alternatively,\ndetermine the flow of execution. Erroneous code example:\n\n```compile_fail,E0004\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x { // error: non-exhaustive patterns: `HastaLaVistaBaby` not covered\n    Terminator::TalkToMyHand => {}\n}\n```\n\nIf you encounter this error you must alter your patterns so that every possible\nvalue of the input type is matched. For types with a small number of variants\n(like enums) you should probably cover all cases explicitly. Alternatively, the\nunderscore `_` wildcard pattern can be added after all other patterns to match\n\"anything else\". Example:\n\n```\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    Terminator::HastaLaVistaBaby => {}\n}\n\n// or:\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    _ => {}\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/exhaustive_integer_patterns.rs","byte_start":1403,"byte_end":1404,"line_start":51,"line_end":51,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":"    match x { //~ ERROR non-exhaustive patterns","highlight_start":11,"highlight_end":12}],"label":"patterns `-128i8..=-8i8`, `-6i8`, `121i8..=124i8` and 1 more not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `-128i8..=-8i8`, `-6i8`, `121i8..=124i8` and 1 more not covered\n  --> /checkout/src/test/ui/exhaustive_integer_patterns.rs:51:11\n   |\nLL |     match x { //~ ERROR non-exhaustive patterns\n   |           ^ patterns `-128i8..=-8i8`, `-6i8`, `121i8..=124i8` and 1 more not covered\n\n"}
[00:51:08] {"message":"non-exhaustive patterns: `-128i8` not covereon":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `-128i8` not covered\n  --> /checkout/src/test/ui/exhaustive_integer_patterns.rs:100:11\n   |\nLL |     match 0i8 { //~ ERROR non-exhaustive patterns\n   |           ^^^ pattern `-128i8` not covered\n\n"}
[00:51:08] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:503:22
[00:51:08] {"message":"non-exhaustive patterns: `0i16` not covered","code":{"code":"E0004","explanation":"\nThis error indicates that the compiler cannot guarantee a matching pattern for\none or more possible inputs to a match expression. Guaranteed matches are\nrequired in order to assign values to match expressions, or alternatively,\ndetermine the flow of execution. Erroneous code example:\n\n```compile_fail,E0004\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x { // error: non-exhaustive patterns: `HastaLaVistaBaby` not covered\n    Terminator::TalkToMyHand => {}\n}\n```\n\nIf you encounter this error you must alter your patterns so that every possible\nvalue of the input type is matched. For types with a small number of variants\n(like enums) you should probably cover all cases explicitly. Alternatively, the\nunderscore `_` wildcard pattern can be added after all other patterns to match\n\"anything else\". Example:\n\n```\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    Terminator::HastaLaVistaBaby => {}\n}\n\n// or:\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    _ attern can be added after all other patterns to match\n\"anything else\". Example:\n\n```\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    Terminator::HastaLaVistaBaby => {}\n}\n\n// or:\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    _ => {}\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/exhaustive_integer_patterns.rs","byte_start":2912,"byte_end":2915,"line_start":126,"line_end":126,"column_start":11,"column_end":14,"is_primary":true,"text":[{"text":"    match 0u8 { //~ ERROR non-exhaustive patterns","highlight_start":11,"highlight_end":14}],"label":"pattern `128u8..=255u8` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `128u8..=255u8` not covered\n  --> /checkout/src/test/ui/exhaustive_integer_patterns.rs:126:11\n   |\nLL |     match 0u8 { //~ ERROR non-exhaustive patterns\n   |           ^^^ pattern `128u8..=255u8` not covered\n\n"}
[00:51:08] {"message":"non-exhaustive patterns: `(0u8, Some(_))` and `(2u8..=255u8, Some(_))` not covered","code":{"code":"E0004","explanation":"\nThis error indicates that the compiler cannot guarantee a matching pattern for\none or more possible inputs to a match expression. Guaranteed matches are\nrequired in order to assign values to match expressions, or alternatively,\ndetermine the flow of execution. Erroneous code example:\n\n```compile_fail,E0004\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::Has, false)` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `(126u8..=127u8, false)` not covered\n  --> /checkout/src/test/ui/exhaustive_integer_patterns.rs:143:11\n   |\nLL |     match (0u8, true) { //~ ERROR non-exhaustive patterns\n   |           ^^^^^^^^^^^ pattern `(126u8..=127u8, false)` not covered\n\n"}
[00:51:08] {"message":"non-exhaustive patterns: `340282366920938463463374607431768211455u128` not covered","code":{"code":"E0004","explanation":"\nThis error indicates that the compiler cannot guarantee a matching pattern for\none or more possible inputs to a match expression. Guaranteed matches are\nrequired in order to assign values to match expressions, or alternatively,\ndetermine the flow of execution. Erroneous code example:\n\n```compile_fail,E0004\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x { // error: non-exhaustive patterns: `HastaLaVistaBaby` not covered\n    Terminator::TalkToMyHand => {}\n}\n```\n\nIf you encounter this error you must alter your patterns so that every possible\nvalue of the input type is matched. For types with a small number of variants\n(like enums) you should probably cover all cases explicitly. Alternatively, the\nunderscore `_` wildcard pattern can be added after all other patterns to match\n\"anything else\". Example:\n\n```\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    Terminator::HastaLaVistaBaby => {}\n}\n\n// or:\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    _ => {}\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/exhaustive_integer_patterns.rs","byte_start":3822,"byte_end":3827,"line_start":163,"line_end":163,"column_start":11,"column_end":16,"is_primary":true,"text":[{"text":"    match 0u128 { //~ ERROR non-exhaustive patterns","highlight_start":11,"highlight_end":16}],"label":"pattern `340282366920938463463374607431768211455u128` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `340282366920938463463374607431768211455u128` not covered\n  --> /checkout/src/test/ui/exhaustive_integer_patterns.rs:163:11\n   |\nLL |     match 0u128 { //~ ERROR non-exhaustive patterns\n   |           ^^^^^ pattern `340282366920938463463374607431768211455u128` not covered\n\n"}
[00:51:08] {"message":"non-exhaustive patterns: `5u128..=340282366920938463463374607431768211455u128` not covered","code":{"code":"E0004","explanation":"\nThis error indicates that the compiler cannot guarantee a matching pattern for\none or more possible inputs to a match expression. Guaranteed matches are\nrequired in order to assign values to match expressions, or alternatively,\ndetermine the flow of execution. Erroneous code example:\n\n```compile_fail,E0004\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x { // error: non-exhaustive patterns: `HastaLaVistaBaby` not covered\n    Terminator::TalkToMyHand => {}\n}\n```\n\nIf you encounter this error yor\none or more possible inputs to a match expression. Guaranteed matches are\nrequired in order to assign values to match expressions, or alternatively,\ndetermine the flow of execution. Erroneous code example:\n\n```compile_fail,E0004\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x { // error: non-exhaustive patterns: `HastaLaVistaBaby` not covered\n    Terminator::TalkToMyHand => {}\n}\n```\n\nIf you encounter this error you must alter your patterns so that every possible\nvalue of the input type is matched. For types with a small number of variants\n(like enums) you should probably cover all cases explicitly. Alternatively, the\nunderscore `_` wildcard pattern can be added after all other patterns to match\n\"anything else\". Example:\n\n```\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    Terminator::HastaLaVistaBaby => {}\n}\n\n// or:\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    _ => {}\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/exhaustive_integer_patterns.rs","byte_start":3986,"byte_end":3991,"line_start":171,"line_end":171,"column_start":11,"column_end":16,"is_primary":true,"text":[{"text":"    match 0u128 { //~ ERROR non-exhaustive patterns","highlight_start":11,"highlight_end":16}],"label":"pattern `0u128..=3u128` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `0u128..=3u128` not covered\n  -->g output.
[00:51:08] status: exit code: 1
[00:51:08] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/for/for-loop-refutable-pattern-error-message.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/for/for-loop-refutable-pattern-error-message/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/for/for-loop-refutable-pattern-error-message/auxiliary" "-A" "unused"
[00:51:08] ------------------------------------------
[00:51:08] 
[00:51:08] ------------------------------------------
[00:51:08] stderr:
[00:51:08] stderr:
[00:51:08] ------------------------------------------
[00:51:08] {"message":"refutable pattern in `for` loop binding: `&-2147483648i32..=0i32` not covered","code":{"code":"E0005","explanation":"\nPatterns used to bind names must be irrefutable, that is, they must guarantee\nthat a name will be extracted in all cases. Erroneous code example:\n\n```compile_fail,E0005\nlet x = Some(1);\nlet Some(y) = x;\n// error: refutable pattern in local binding: `None` not covered\n```\n\nIf you encounter this error you probably need to use a `match` or `if let` to\ndeal with the possibility of failure. Example:\n\n```\nlet x = Some(1);\n\nmatch x {\n    Some(y) => {\n        // do something\n    },\n    None => {}\n}\n\n// or:\n\nif let Some(y) = x {\n    // do something\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/for/for-loop-refutable-pattern-error-message.rs","byte_start":487,"byte_end":489,"line_start":12,"line_end":12,"column_start":9,"column_end":11,"is_primary":true,"text":[{"text":"    for &1 in [1].iter() {} //~ ERROR refutable pattern in `for` loop binding","highlight_start":9,"highlight_end":11}],"label":"pattern `&-2147483648i32..=0i32` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0005]: refutable pattern in `for` loop binding: `&-2147483648i32..=0i32` not covered\n  --> /checkout/src/test/ui/for/for-loop-refutable-pattern-error-message.rs:12:9\n   |\nLL |     for &1 in [1].iter() {} //~ ERROR refutable pattern in `for` loop binding\n   |         ^^ pattern `&-2147483648i32..=0i32` not covered\n\n"}
[00:51:08] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:51:08] {"message":"For more information about this error, try `rustc --explain E0005`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0005`.\n"}
[00:51:08] ------------------------------------------
[00:51:08] 
[00:51:08] thread '[ui] ui/for/for-loop-refutable-pattern-error-message.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:51:08] 
[00:51:08] 
[00:51:08] ---- [ui] ui/match/match-non-exhaustive.rs stdout ----
[00:51:08] diff of stderr:
[00:51:08] 
[00:51:08] - error[E0004]: non-exhaustive patterns: `_` not covered
[00:51:08] + error[E0004]: non-exhaustive patterns: `-2147483648i32..=0i32` and `2i32..=2147483647i32` not covered
[00:51:08] 3    |
[00:51:08] 3    |
[00:51:08] 4 LL |     match 0 { 1 => () } //~ ERROR non-exhaustive patterns
[00:51:08] 
[00:51:08] -    |           ^ pattern `_` not covered
[00:51:08] +    |           ^ patterns `-2147483648i32..=0i32` and `2i32..=2147483647i32` not covered
[00:51:08] 6 
[00:51:08] 7 error[E0004]: non-exhaustive patterns: `_` not covered
[00:51:08] 
[00:51:08] 
[00:51:08] The actual stderr differed from the expected stderr.
[00:51:08] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/match/match-non-exhaustive/match-non-exhaustive.stderr
[00:51:08] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/match/match-non-exhaustive/match-non-exhaustive.stderr
[00:51:08] To update references, rerun the tests and pass the `--bless` flag
[00:51:08] To only update this specific test, also pass `--test-args match/match-non-exhaustive.rs`
[00:51:08] error: 1 errors occurred comparing output.
[00:51:08] status: exit code: 1
[00:51:08] status: exit code: 1
[00:51:08] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/match/match-non-exhaustive.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/match/match-non-exhaustive/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/match/match-non-exhaustive/auxiliary" "-A" "unused"
[00:51:08] ------------------------------------------
[00:51:08] 
[00:51:08] ------------------------------------------
[00:51:08] stderr:
[00:51:08] stderr:
[00:51:08] ------------------------------------------
[00:51:08] {"message":"non-exhaustive patterns: `-2147483648i32..=0i32` and `2i32..=2147483647i32` not covered","code":{"code":"E0004","explanation":"\nThis error indicates that the compiler cannot guarantee a matching pattern for\none or more possible inputs to a match expression. Guaranteed matches are\nrequired in order to assign values to match expressions, or alternatively,\ndetermine the flow of execution. Erroneous code example:\n\n```compile_fail,E0004\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x { // error: non-exhaustive patterns: `HastaLaVistaBaby` not covered\n    Terminator::TalkToMyHand => {}\n}\n```\n\nIf you encounter this error you must alter your patterns so that every possible\nvalue of the input type is matched. For types with a small number of variants\n(like enums) you should probably cover all cases explicitly. Alternatively, the\nunderscore `_` wildcard pattern can be added after all other patterns to match\n\"anything else\". Example:\n\n```\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    Terminator::HastaLaVistaBaby => {}\n}\n\n// or:\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    _ => {}\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/match/match-non-exhaustive.rs","byte_start":489,"byte_end":490,"line_start":12,"line_end":12,"coatch\n\"anything else\". Example:\n\n```\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    Terminator::HastaLaVistaBaby => {}\n}\n\n// or:\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    _ => {}\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/match/match-non-exhaustive.rs","byte_start":547,"byte_end":548,"line_start":13,"line_end":13,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":"    match 0 { 0 if false => () } //~ ERROR non-exhaustive patterns","highlight_start":11,"highlight_end":12}],"label":"pattern `_` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `_` not covered\n  --> /checkout/src/test/ui/match/match-non-exhaustive.rs:13:11\n   |\nLL |     match 0 { 0 if false => () } //~ ERROR non-exhaustive patterns\n   |           ^ pattern `_` not covered\n\n"}
[00:51:08] {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[00:51:08] {"message":"For more information about this error, try `rustc --explain E0004`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0004`.\n"}
[00:51:08] ------------------------------------------
[00:51:08] 
[00:51:08] thread '[ui] ui/match/match-non-exhaustive.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:51:08] 
[00:51:08] 
[00:51:08] ---- [ui] ui/match/match-range-fail-dominate.rs stdout ----
[00:51:08] diff of stderr:
[00:51:08] 
[00:51:08] 62 LL |       0.02f64 => {}
[00:51:08] 64 
[00:51:08] - error: aborting due to 5 previous errors
[00:51:08] + error: unreachable pattern
[00:51:08] +   --> $DIR/match-range-fail-dominate.rs:47:7
---
[00:51:08] 
[00:51:08] 
[00:51:08] The actual stderr differed from the expected stderr.
[00:51:08] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/match/match-range-fail-dominate/match-range-fail-dominate.stderr
[00:51:08] To update references, rerun the tests and pass the `--bless` flag
[00:51:08] To only update this specific test, also pass `--test-args match/match-range-fail-dominate.rs`
[00:51:08] error: 1 errors occurred comparing output.
[00:51:08] status: exit code: 1
[00:51:08] status: exit code: 1
[00:51:08] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/match/match-range-fail-dominate.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/match/match-range-fail-dominate/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/match/match-range-fail-dominate/auxiliary" "-A" "unused"
[00:51:08] ------------------------------------------
[00:51:08] 
[00:51:08] ------------------------------------------
[00:51:08] stderr:
[00:51:08] stderr:
[00:51:08] ------------------------------------------
[00:51:08] {"message":"unreachable pattern","code":{"code":"unreachable_patterns","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/match/match-range-fail-dominate.rs","byte_start":699,"byte_end":706,"line_start":22,"line_end":22,"column_start":7,"column_end":14,"is_primary":true,"text":[{"text":"      5 ... 6 => { }","highlight_start":7,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"lint level defined here","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/match/match-range-fail-dominate.rs","byte_start":621,"byte_end":641,"line_start":17,"line_end":17,"column_start":9,"column_end":29,"is_primary":true,"text":[{"text":"#![deny(unreachable_patterns)]","highlight_start":9,"highlight_end":29}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error: unreachable pattern\n  --> /checkout/src/test/ui/match/match-range-fail-dominate.rs:22:7\n   |\nLL |       5 ... 6 => { }\n   |       ^^^^^^^\n   |\nnote: lint level defined here\n  --> /checkout/src/test/ui/match/match-range-fail-dominate.rs:17:9\n   |\nLL | #![deny(unreachable_patterns)]\n   |         ^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:51:08] {"message":"unreachable pattern","code":{"code":"unreachable_patterns","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/match/match-range-fail-dominate.rs","byte_start":777,"byte_end":784,"line_start":28,"line_end":28,"column_start":7,"column_end":14,"is_primary":true,"text":[{"text":"      4 ... 6 => { }","highlight_start":7,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unreachable pattern\n  --> /checkout/src/test/ui/match/match-range-fail-dominate.rs:28:7\n   |\nLL |       4 ... 6 => { }\n   |       ^^^^^^^\n\n"}
[00:51:08] {"message":"unreachable pattern","code":{"code":"unreachable_patterns","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/match/match-range-fail-dominate.rs","byte_start":855,"byte_end":862,"line_start":34,"line_end":34,"column_start":7,"column_end":14,"is_primary":true,"text":[{"text":"      4 ... 6 => { }","highlight_start":7,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unreachable pattern\n  --> /checkout/src/test/ui/match/match-range-fail-dominate.rs:34:7\n   |\nLL |       4 ... 6 => { }\n   |       ^^^^^^^\n\n"}
[00:51:08] {"message":"unreachable pattern","code":{"code":"unreachable_patterns","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/match/match-range-fail-dominate.rs","byte_start":938,"byte_end":949,"line_start":40,"line_end":40,"column_start":7,"column_end":18,"is_primary":true,"text":[{"text":"      'a' ... 'z' => {}","highlight_start":7,"highlight_end":18}],"label":null,"suggested_replacement":nulliler but is being phased out; it will become a hard error in a future release!\n   = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>\n\n"}
[00:51:08] {"message":"floating-point types cannot be used in patterns","code":{"code":"illegal_floating_point_literal_pattern","explanation":null},"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/match/match-range-fail-dominate.rs","byte_start":1015,"byte_end":1021,"line_start":45,"line_end":45,"column_start":19,"column_end":25,"is_primary":true,"text":[{"text":"      0.01f64 ... 6.5f64 => {}","highlight_start":19,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!","code":null,"level":"warning","spans":[],"children":[],"rendered":null},{"message":"for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"warning: floating-point types cannot be used in patterns\n  --> /checkout/src/test/ui/match/match-range-fail-dominate.rs:45:19\n   |\nLL |       0.01f64 ... 6.5f64 => {}\n   |                   ^^^^^^\n   |\n   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!\n   = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>\n\n"}
[00:51:08] {"message":"floating-point types cannot be used in patterns","":7,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unreachable pattern\n  --> /checkout/src/test/ui/match/match-range-fail-dominate.rs:46:7\n   |\nLL |       0.02f64 => {}\n   |       ^^^^^^^\n\n"}
[00:51:08] {"message":"unreachable pattern","code":{"code":"unreachable_patterns","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/match/match-range-fail-dominate.rs","byte_start":1054,"byte_end":1055,"line_start":47,"line_end":47,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":"      _ => {}","highlight_start":7,"highlight_end":8}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unreachable pattern\n  --> /checkout/src/test/ui/match/match-range-fail-dominate.rs:47:7\n   |\nLL |       _ => {}\n   |       ^\n\n"}
[00:51:08] {"message":"aborting due to 6 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 6 previous errors\n\n"}
[00:51:08] ------------------------------------------
[00:51:08] 
[00:51:08] thread '[ui] ui/match/match-range-fail-dominate.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:51:08] 
[00:51:08] 
[00:51:08] ---- [ui] ui/non-exhaustive/non-exhaustive-match.rs stdout ----
[00:51:08] diff of stderr:
[00:51:08] 
[00:51:08] 16 LL |     match Some(10) { //~ ERROR non-exhaustive patterns: `Some(_)` not covered
[00:51:08] 17    |           ^^^^^^^^ pattern `Some(_)` not covered
[00:51:08] 18 
[00:ator::TalkToMyHand => {}\n    _ => {}\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/non-exhaustive/non-exhaustive-match.rs","byte_start":604,"byte_end":605,"line_start":18,"line_end":18,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":"    match x { t::b => { } } //~ ERROR non-exhaustive patterns: `a` not covered","highlight_start":11,"highlight_end":12}],"label":"pattern `a` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `a` not covered\n  --> /checkout/src/test/ui/non-exhaustive/non-exhaustive-match.rs:18:11\n   |\nLL |     match x { t::b => { } } //~ ERROR non-exhaustive patterns: `a` not covered\n   |           ^ pattern `a` not covered\n\n"}
[00:51:08] {"message":"non-exhaustive patterns: `false` not covered","code":{"code":"E0004","explanation":"\nThis error indicates that the compiler cannot guarantee a matching pattern for\none or more possible inputs to a match expression. Guaranteed matches are\nrequired in order to assign values to match expressions, or alternatively,\ndetermine the flow of execution. Erroneous code example:\n\n```compile_fail,E0004\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x { // error: non-exhaustive patterns: `HastaLaVistaBaby` not covered\n    Terminator::TalkToMyHand => {}\n}\n```\n\nIf you encounter this error you must alter your patterns so that every possible\nvalue of the input type is matched. For types with a small number of variants\n(like enums) you should probably cover all cases explicitly. Alternatively, the\nunderscore `_` wildcard pattern can be added after all other patterns to match\n\"anything else\". Example:\n\n```\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    Terminator::HastaLaVistaBaby => {}\n}\n\n// or:\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    _ => {}\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/non-exhaustive/non-exhaustive-match.rs","byte_start":683,"byte_end":687,"line_start":19,"line_end":19,"column_start":11,"column_end":15,"is_primary":true,"text":[{"text":"    match true { //~ ERROR non-exhaustive patterns: `false` not covered","highlight_start":11,"highlight_end":15}],"label":"pattern `false` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `false` not covered\n  --> /checkout/src/test/ui/non-exhaustive/non-exhaustive-match.rs:19:11\n   |\nLL |     match true { //~ ERROR non-exhaustive patterns: `false` not covered\n   |           ^^^^ pattern `false` not covered\n\n"}
[00:51:08] {"message":"non-exhaustive patterns: `Some(_)` not covered","code":{"code":"E0004","explanation":"\nThis error indicates that the compiler cannot guarantee a matching pattern for\none or more possible inputs to a match expression. Guaranteed matches are\nrequired in order to assign values to match expressions, or alternatively,\ndetermine the flow of execution. Erroneous code example:\n\n```compile_fail,E0004\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x { // error: non-exhaustive patterns: `HastaLaVistaBaby` not covered\n    Terminator::TalkToMyHand => {}\n}\n```\n\nIf you encounter this error you must alter your patterns so that every possible\nvalue of the input type is matched. For types with a small number of variants\n(like enums) you should probably cover all cases explicitly. Alternatively, the\nunderscore `_` wildcard pattern can be added after all other patterns to match\n\"anything else\". Example:\n\n```\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    Terminator::HastaLaVistaBaby => {}\n}\n\n// or:\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    _ => {}\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/non-exhaustive/non-exhaustive-match.rs","byte_start":778,"byte_end":786,"line_start":22,"line_end":22,"column_start":11,"column_end":19,"is_primary":true,"text":[{"text":"    match Some(10) { //~ ERROR non-exhaustive patterns: `Some(_)` not covered","highlight_start":11,"highlight_end":19}],"label":"pattern `Some(_)` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `Some(_)` not covered\n  --> /checkout/src/test/ui/non-exhaustive/non-exhaustive-match.rs:22:11\n   |\nLL |     match Some(10) { //~ ERROR non-exhaustive patterns: `Some(_)` not covered\n   |           ^^^^^^^^ pattern `Some(_)` not covered\n\n"}
[00:51:08] {"mhlight_start":11,"highlight_end":20}],"label":"patterns `(_, _, -2147483648i32..=3i32)` and `(_, _, 5i32..=2147483647i32)` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `(_, _, -2147483648i32..=3i32)` and `(_, _, 5i32..=2147483647i32)` not covered\n  --> /checkout/src/test/ui/non-exhaustive/non-exhaustive-match.rs:25:11\n   |\nLL |     match (2, 3, 4) { //~ ERROR non-exhaustive patterns: `(_, _, _)` not covered\n   |           ^^^^^^^^^ patterns `(_, _, -2147483648i32..=3i32)` and `(_, _, 5i32..=2147483647i32)` not covered\n\n"}
[00:51:08] {"message":"non-exhaustive patterns: `(a, a)` not covered","code":{"code":"E0004","explanation":"\nThis error indicates that the compiler cannot guarantee a matching pattern for\none or more possible inputs to a match expression. Guaranteed matches are\nrequired in order to assign values to match expressions, or alternatively,\ndetermine the flow of execution. Erroneous code example:\n\n```compile_fail,E0004\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x { // error: non-exhaustive patterns: `HastaLaVistaBaby` not covered\n    Terminator::TalkToMyHand => {}\n}\n```\n\nIf you encounter this error you must alter your patterns so that every possible\nvalue of the input type is matched. For types with a small number of variants\n(like enums) you should probably cover all cases explicitly. Alternatively, the\nunderscore `_` wildcard pattern can be added after all other patterns to match\n\"anything else\". Example:\n\n```\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    Terminator::HastaLaVistaBaby => {}\n}\n\n// or:\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    _ => {}\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/non-exhaustive/non-exhaustive-match.rs","byte_start":988,"byte_end":1000,"line_start":28,"line_end":28,"column_start":11,"column_end":23,"is_primary":true,"text":[{"text":"    match (t::a, t::a) { //~ ERROR non-exhaustive patterns: `(a, a)` not covered","highlight_start":11,"highlight_end":23}],"label":"pattern `(a, a)` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `(a, a)` not covered\n  --> /checkout/src/test/ui/non-exhaustive/non-exhaustive-match.rs:28:11\n   |\nLL |     match (t::a, t::a) { //~ ERROR non-exhaustive patterns: `(a, a)` not covered\n   |           ^^^^^^^^^^^^ pattern `(a, a)` not covered\n\n"}
[00:51:08] {"message":"non-exhaustive patterns: `b` not covered","code":{"code":"E0004","explanation":"\nThis error indicates that the compiler cannot guarantee a matching pattern for\none or more possible inputs to a match expression. Guaranteed matches are\nrequired in order to assign values to match expressions, or alternatively,\ndetermine the flow of execution. Erroneous code example:\n\n```compile_fail,E0004\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x { // error: non-exhaustive patterns: `HastaLaVistaBaby` not covered\n    Terminator::TalkToMyHand => {}\n}\n```\n\nIf you encounter this error you must alter your patterns so that every possible\nvalue of the input type is matched. For types with a small number of variants\n(like enums) you should probably cover all cases explicitly. Alternatively, the\nunderscore `_` wildcard pattern can be added after all other patterns to match\n\"anything else\". Example:\n\n```\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    Terminator::HastaLaVistaBaby => {}\n}\n\n// or:\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    _ => {}\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/non-exhaustive/non-exhaustive-match.rs","byte_start":1125,"byte_end":1129,"line_start":32,"line_end":32,"column_start":11,"column_end":15,"is_primary":true,"text":[{"text":"    match t::a { //~ ERROR non-exhaustive patterns: `b` not covered","highlight_start":11,"highlight_end":15}],"label":"pattern `b` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `b` not covered\n  --> /checkout/src/test/ui/non-exhaustive/non-exhaustive-match.rs:32:11\n   |\nLL |     match t::a { //~ ERROR non-exhaustive patterns: `b` not covered\n   |           ^^^^ pattern `b` not covered\n\n"}
[00:51:08] {"message":"non-exhaustive patterns: `[]` not covered","code":{"code":"E0004","explanation":"\nThis error indicates that the compiler cannot guarantee a matching pattern for\none or more possible inputs to a match expression. Guaranteed matches are\nrequired in order to assign values to match expressions, or alternatively,\ndetermine the flow of execution. Erroneous code example:\n\n```compile_fail,E0004\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x { // error: non-exhaustive patterns: `HastaLaVistaBaby` not covered\n    Terminator::TalkToMyHand => {}\n}\n```\n\nIf you encounter this error you must alter your patterns so that every possible\nvalue of the input type is matched. For types with a small number of variants\n(like enums) you should probably cover all cases explicitly. Alternatively, the\nunderscore `_` wildcard pattern can be added after all other patterns to match\n\"anything else\". Example:\n\n```\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    Terminator::HastaLaVistaBaby => {}\n}\n\n// or:\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    _ => {}\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/non-exhaustive/non-exhaustive-match.rs","byte_start":1474,"byte_end":1478,"line_start":43,"line_end":43,"column_start":11,"column_end":15,"is_primary":true,"text":[{"text":"    match *vec { //~ ERROR non-exhaustive patterns: `[]` not covered","highlight_start":11,"highlight_end":15}],"label":"pattern `[]` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `[]` not covered\n  --> /checkout/"column_start":11,"column_end":15,"is_primary":true,"text":[{"text":"    match *vec { //~ ERROR non-exhaustive patterns: `[_, _, _, _]` not covered","highlight_start":11,"highlight_end":15}],"label":"pattern `[_, _, _, _]` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `[_, _, _, _]` not covered\n  --> /checkout/src/test/ui/non-exhaustive/non-exhaustive-match.rs:56:11\n   |\nLL |     match *vec { //~ ERROR non-exhaustive patterns: `[_, _, _, _]` not covered\n   |           ^^^^ pattern `[_, _, _, _]` not covered\n\n"}
[00:51:08] {"message":"aborting due to 8 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 8 previous errors\n\n"}
[00:51:08] {"message":"For more information about this error, try `rustc --explain E0004`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0004`.\n"}
[00:51:08] ------------------------------------------
[00:51:08] 
[00:51:08] thread '[ui] ui/non-exhaustive/non-exhaustive-match.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:51:08] 
[00:51:08] 
[00:51:08] ---- [ui] ui/refutable-pattern-errors.rs stdout ----
[00:51:08] diff of stderr:
[00:51:08] 
[00:51:08] 4 LL | fn func((1, (Some(1), 2..=3)): (isize, (Option<isize>, isize))) { }
[00:51:08] 5    |         ^^^^^^^^^^^^^^^^^^^^^ pattern `(_, _)` not covered
[00:51:08] 6 
[00:51:08] - error[E0005]: refutable pattern in local binding: `(_, _)` not covered
[00:51:08] + e51:08] 
[00:51:08] stderr:
[00:51:08] ------------------------------------------
[00:51:08] ------------------------------------------
[00:51:08] {"message":"refutable pattern in function argument: `(_, _)` not covered","code":{"code":"E0005","explanation":"\nPatterns used to bind names must be irrefutable, that is, they must guarantee\nthat a name will be extracted in all cases. Erroneous code example:\n\n```compile_fail,E0005\nlet x = Some(1);\nlet Some(y) = x;\n// error: refutable pattern in local binding: `None` not covered\n```\n\nIf you encounter this error you probably need to use a `match` or `if let` to\ndeal with the possibility of failure. Example:\n\n```\nlet x = Some(1);\n\nmatch x {\n    Some(y) => {\n        // do something\n    },\n    None => {}\n}\n\n// or:\n\nif let Some(y) = x {\n    // do something\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/refutable-pattern-errors.rs","byte_start":476,"byte_end":497,"line_start":12,"line_end":12,"column_start":9,"column_end":30,"is_primary":true,"text":[{"text":"fn func((1, (Some(1), 2..=3)): (isize, (Option<isize>, isize))) { }","highlight_start":9,"highlight_end":30}],"label":"pattern `(_, _)` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0005]: refutable pattern in function argument: `(_, _)` not covered\n  --> /checkout/src/test/ui/refutable-pattern-errors.rs:12:9\n   |\nLL | fn func((1, (Some(1), 2..=3)): (isize, (Option<isize>, isize))) { }\n   |         ^^^^^^^^^^^^^^^^^^^^^ pattern `(_, _)` not covered\n\n"}
[00:51:08] {"message":"refutable pattern i4133972 .
2402848 ./obj/build
1757840 ./obj/build/x86_64-unknown-linux-gnu
1165248 ./src
565152 ./.git
---
149728 ./obj/build/bootstrap/debug/incremental
142548 ./obj/build/x86_64-unknown-linux-gnu/test
142544 ./obj/build/x86_64-unknown-linux-gnu/test/ui
134136 ./obj/build/bootstrap/debug/incremental/bootstrap-1plb86h2refwc
134132 ./obj/build/bootstrap/debug/incremental/bootstrap-1plb86h2refwc/s-f75gg7xe1a-19hy7pk-2xn3crcwe77k0
131172 ./.git/modules/src
130876 ./obj/build/x86_64-unknown-linux-gnu/stage1-rustc
130772 ./obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu
130768 ./obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release

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)

Show resolved Hide resolved src/test/run-pass/array-slice-vec/vec-matching-autoslice.stderr Outdated
Show resolved Hide resolved src/test/run-pass/binding/match-range.stderr Outdated
Show resolved Hide resolved src/test/run-pass/binding/match-range.stderr Outdated
Show resolved Hide resolved src/test/run-pass/binding/match-range.stderr Outdated
Show resolved Hide resolved src/test/run-pass/issues/issue-15881-model-lexer-dotdotdot.stderr Outdated
Show resolved Hide resolved src/test/run-pass/issues/issue-7222.stderr Outdated
Show resolved Hide resolved src/test/ui/consts/const-pattern-irrefutable.rs Outdated
Show resolved Hide resolved src/test/ui/exhaustive_integer_patterns.rs Outdated
Show resolved Hide resolved src/test/ui/match/match-range-fail-dominate.stderr Outdated
@varkor

This comment has been minimized.

Copy link
Member Author

varkor commented Nov 30, 2018

@Centril: I think you're right; there's a bug with the handling of floating-point numbers here. I'll look into it and add another test case.

@Centril

This comment has been minimized.

Copy link
Contributor

Centril commented Nov 30, 2018

@varkor For completeness I'd also include a test case that shows that removing the _ => ... actually errors in addition to the one showing that the lint doesn't fire.

@varkor varkor force-pushed the varkor:stabilise-exhaustive-integer-patterns branch from 8af6373 to 4406391 Nov 30, 2018

@Centril
Copy link
Contributor

Centril left a comment

Looks great <3.

@Centril

This comment has been minimized.

Copy link
Contributor

Centril commented Dec 1, 2018

@estebank Are we happy with the PR?

@@ -1780,6 +1780,13 @@ impl<'a, 'gcx, 'tcx> TyS<'tcx> {
}
}

pub fn is_pointer_sized(&self) -> bool {

This comment has been minimized.

@eddyb

eddyb Dec 2, 2018

Member

This name doesn't feel ideal. I'd rather have is_target_agnostic_primitive that return true only for non-{u,i}size integer types, char and floating-point types.

This comment has been minimized.

@nikomatsakis

nikomatsakis Dec 4, 2018

Contributor

It seems like reversing the sense of this function would complicate some of the tests below, in particular the one that checks (is_pointer_sized() && !feature.pointer_sized) or whatever. I think the function is ok "as is" though. I mean the isize and usize pattern are meant (I think) to evoke the "native size" of a pointer. I might prefer is_pointer_sized_int though, just to be a bit more specific (is_target_dependent_int would be ok too but feels less obvious to me).

This comment has been minimized.

@varkor

varkor Dec 4, 2018

Author Member

Yes, the function is used explicitly for the pointer-sized integers, so making it more general would obfuscate the uses. I can make the name a bit more descriptive as suggested, though.

@eddyb

This comment has been minimized.

Copy link
Member

eddyb commented Dec 2, 2018

@estebank

This comment has been minimized.

Copy link
Contributor

estebank commented Dec 3, 2018

@Centril LGTM++, but I'll defer to niko's review.

@nikomatsakis
Copy link
Contributor

nikomatsakis left a comment

r=me -- not sure how much @eddyb cares about the name of is_pointer_sized though

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Dec 4, 2018

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 4, 2018

📌 Commit 4406391 has been approved by nikomatsakis

bors added a commit that referenced this pull request Dec 6, 2018

Auto merge of #56557 - pietroalbini:rollup, r=pietroalbini
Rollup of 11 pull requests

Successful merges:

 - #56315 (Rustdoc inline macro reexport)
 - #56332 ([rustdoc] Specific crate search)
 - #56362 (Stabilise exhaustive integer patterns)
 - #56426 (libsyntax_pos: A few tweaks)
 - #56441 (rustbuild: Fix issues with compiler docs)
 - #56446 (pass the parameter environment to `traits::find_associated_item`)
 - #56500 (cleanup: remove static lifetimes from consts)
 - #56525 (Avoid extra copy and syscall in std::env::current_exe)
 - #56528 (Remove unused dependency (rustc_lint -> rustc_mir))
 - #56548 (Optimized string FromIterator + Extend impls)
 - #56553 (Don't print the profiling summary to stdout when -Zprofile-json is set)

Failed merges:

r? @ghost
// normalize-stderr-32bit: "2147483647isize" -> "$$ISIZE_MAX"
// normalize-stderr-64bit: "9223372036854775807isize" -> "$$ISIZE_MAX"
// normalize-stderr-32bit: "4294967295usize" -> "$$USIZE_MAX"
// normalize-stderr-64bit: "18446744073709551615usize" -> "$$USIZE_MAX"

This comment has been minimized.

@eddyb

eddyb Dec 6, 2018

Member

I guess this is neat but it's not enough for 16-bit targets.

This comment has been minimized.

@kennytm

kennytm Dec 6, 2018

Member

compilertest itself doesn't recognize 16-bit targets 🙁

pub fn get_pointer_width(triple: &str) -> &'static str {
if (triple.contains("64") && !triple.ends_with("gnux32")) || triple.starts_with("s390x") {
"64bit"
} else {
"32bit"
}
}

@varkor varkor force-pushed the varkor:stabilise-exhaustive-integer-patterns branch from ed64b19 to 5be3f0e Dec 6, 2018

@varkor

This comment has been minimized.

Copy link
Member Author

varkor commented Dec 6, 2018

@bors r=nikomatsakis

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 6, 2018

📌 Commit 5be3f0e has been approved by nikomatsakis

@bors

This comment has been minimized.

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

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Dec 6, 2018

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:00e1128a:start=1544106980825711898,finish=1544107035779812663,duration=54954100765
$ 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:45:50] .................................................................................................... 3500/5123
[00:45:53] ...........................ii....................................................................... 3600/5123
[00:45:55] .............................................i...................................................... 3700/5123
[00:45:56] .................................................................................................... 3800/5123
[00:45:57] .i.................................................................................................. 3900/5123
[00:46:02] ...........................F........................................................................ 4000/5123
[00:46:09] .................................................................................................... 4200/5123
[00:46:13] ................................................................................................i... 4300/5123
[00:46:17] .................................................................................................... 4400/5123
[00:46:21] .................................................................................................... 4500/5123
---
[00:46:39] 
[00:46:39] ---- [ui] ui/precise_pointer_size_matching.rs stdout ----
[00:46:39] diff of stderr:
[00:46:39] 
[00:46:39] 1 error[E0004]: non-exhaustive patterns: `$ISIZE_MIN..=-6isize` and `21isize..=$ISIZE_MAX` not covered
[00:46:39] +   --> $DIR/precise_pointer_size_matching.rs:27:11
[00:46:39] 3    |
[00:46:39] 3    |
[00:46:39] 4 LL |     match 0isize { //~ ERROR non-exhaustive patterns
[00:46:39] 5    |           ^^^^^^ patterns `$ISIZE_MIN..=-6isize` and `21isize..=$ISIZE_MAX` not covered
[00:46:39] 6 
[00:46:39] 6 
[00:46:39] 7 error[E0004]: non-exhaustive patterns: `0usize` and `21usize..=$USIZE_MAX` not covered
[00:46:39] +   --> $DIR/precise_pointer_size_matching.rs:32:11
[00:46:39] 9    |
[00:46:39] 9    |
[00:46:39] 10 LL |     match 0usize { //~ ERROR non-exhaustive patterns
[00:46:39] 11    |           ^^^^^^ patterns `0usize` and `21usize..=$USIZE_MAX` not covered
[00:46:39] 
[00:46:39] The actual stderr differed from the expected stderr.
[00:46:39] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/precise_pointer_size_matching/precise_pointer_size_matching.stderr
[00:46:39] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/precise_pointer_size_matching/precise_pointer_size_matching.stderr
[00:46:39] To update references, rerun the tests and pass the `--bless` flag
[00:46:39] To only update this specific test, also pass `--test-args precise_pointer_size_matching.rs`
[00:46:39] error: 1 errors occurred comparing output.
[00:46:39] status: exit code: 1
[00:46:39] status: exit code: 1
[00:46:39] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/precise_pointer_size_matching.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/precise_pointer_size_matching/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/precise_pointer_size_matching/auxiliary" "-A" "unused"
[00:46:39] ------------------------------------------
[00:46:39] 
[00:46:39] ------------------------------------------
[00:46:39] stderr:
[00:46:39] stderr:
[00:46:39] ------------------------------------------
[00:46:39] {"message":"non-exhaustive patterns: `-9223372036854775808isize..=-6isize` and `21isize..=9223372036854775807isize` not covered","code":{"code":"E0004","explanation":"\nThis error indicates that the compiler cannot guarantee a matching pattern for\none or more possible inputs to a match expression. Guaranteed matches are\nrequired in order to assign values to match expressions, or alternatively,\ndetermine the flow of execution. Erroneous code example:\n\n```compile_fail,E0004\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x { // error: non-exhaustive patterns: `HastaLaVistaBaby` not covered\n    Terminator::TalkToMyHand => {}\n}\n```\n\nIf you encounter this error you must alter your patterns so that every possible\nvalue of the input type is matched. For types with a small number of variants\n(like enums) you should probably cover all cases explicitly. Alternatively, the\nunderscore `_` wildcard pattern can be added after all other patterns to match\n\"anything else\". Example:\n\n```\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    Terminator::HastaLaVistaBaby => {}\n}\n\n// or:\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    _ => {}\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/precise_pointer_size_matching.rs","byte_start":871,"byte_end":877,"line_start":27,"line_end":27,"column_start":11,"column_end":17,"is_primary":true,"text":[{"text":"    match 0isize { //~ ERROR non-exhaustive patterns","highlight_start":11,"highlight_end":17}],"label":"patterns `-9223372036854775808isize..=-6isize` and `21isize..=9223372036854775807isize` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `-9223372036854775808isize..=-6isize` and `21isize..=9223372036854775807isize` not covered\n  --> /checkout/src/test/ui/precise_pointer_size_matching.rs:27:11\n   |\nLL |     match 0isize { //~ ERROR non-exhaustive patterns\n   |           ^^^^^^ patterns `-9223372036854775808isize..=-6isize` and `21isize..=9223372036854775807isize` not covered\n\n"}
[00:46:39] {"message":"non-exhaustive patterns: `0usize` and `21usize..=18446744073709551615usize` not covered","code":{"code":"E0004","explanation":"\nThis error indicates that the compiler cannot guarantee a matching pattern for\none or more possible inputs to a match expression. Guaranteed matches are\nrequired in order to assign values to match expressions, or alternatively,\ndetermine the flow of execution. Erroneous code example:\n\n```compile_fail,E0004\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x { // error: non-exhaustive patterns: `HastaLaVistaBaby` not covered\n    Terminator::TalkToMyHand => {}\n}\n```\n\nIf you encounter this error you must alter your patterns so that every possible\nvalue of the input type is matched. For types with a small number of variants\n(like enums) you should probably cover all cases explicitly. Alternatively, the\nunderscore `_` wildcard pattern can be added after all other patterns to match\n\"anything else\". Example:\n\n```\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    Terminator::HastaLaVistaBaby => {}\n}\n\n// or:\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    _ => {}\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/precise_pointer_size_matching.rs","byte_start":977,"byte_end":983,"line_start":32,"line_end":32,"column_start":11,"column_end":17,"is_primary":true,"text":[{"text":"    match 0usize { //~ ERROR non-exhaustive patterns","highlight_start":11,"highlight_end":17}],"label":"patterns `0usize` and `21usize..=18446744073709551615usize` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `0usize` and `21usize..=18446744073709551615usize` not covered\n  --> /checkout/src/test/ui/precise_pointer_size_matching.rs:32:11\n   |\nLL |     match 0usize { //~ ERROR non-exhaustive patterns\n   |           ^^^^^^ patterns `0usize` and `21usize..=18446744073709551615usize` not covered\n\n"}
[00:46:39] {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[00:46:39] {"message":"For more information about this error, try `rustc --explain E0004`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0004`.\n"}
[00:46:39] ------------------------------------------
[00:46:39] 
[00:46:39] thread '[ui] ui/precise_pointer_size_matching.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3284:9
[00:46:39] 
---
[00:46:39] 
[00:46:39] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:503:22
[00:46:39] 
[00:46:39] 
[00:46:39] 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-5.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -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" "5.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"
[00:46:39] 
[00:46:39] 
[00:46:39] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:46:39] Build completed unsuccessfully in 0:03:43
[00:46:39] Build completed unsuccessfully in 0:03:43
[00:46:39] Makefile:58: recipe for target 'check' failed
[00:46:39] make: *** [check] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0cb848aa
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Thu Dec  6 15:24:05 UTC 2018
---
travis_time:end:028b5074:start=1544109846619441444,finish=1544109846623543734,duration=4102290
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:1416a224
$ 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)

@varkor varkor force-pushed the varkor:stabilise-exhaustive-integer-patterns branch from 5be3f0e to 944bb2c Dec 6, 2018

@varkor

This comment has been minimized.

Copy link
Member Author

varkor commented Dec 6, 2018

@bors r=nikomatsakis rollup

I didn't spot what was going on before I force pushed, so now the change in this PR looks funny, but the original change got merged as part of the rollup #56557, without the fixes to the tests on 16-bit pointer size platforms. It's probably simplest to just merge the 16-bit fix as this PR now, but close the related issues.

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 6, 2018

📌 Commit 944bb2c has been approved by nikomatsakis

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Dec 6, 2018

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:00983100:start=1544109975084152681,finish=1544109976866347578,duration=1782194897
$ 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:46:44] .................................................................................................... 3500/5123
[00:46:47] ...........................ii....................................................................... 3600/5123
[00:46:49] .............................................i...................................................... 3700/5123
[00:46:50] .................................................................................................... 3800/5123
[00:46:51] .i.................................................................................................. 3900/5123
[00:46:56] ...........................F........................................................................ 4000/5123
[00:47:04] .................................................................................................... 4200/5123
[00:47:07] ................................................................................................i... 4300/5123
[00:47:12] .................................................................................................... 4400/5123
[00:47:16] .................................................................................................... 4500/5123
[00:47:16] .................................................................................................... 4500/5123
[00:47:18] .................................................................................................... 4600/5123
[00:47:22] ..............................................................................i..................... 4700/5123
[00:47:25] .................................................................................................... 4800/5123
[00:47:28] .................................................................................................... 4900/5123
[00:47:31] .................................................................................................... 5000/5123
[00:47:33] ..............................................................i..................................... 5100/5123
 To only update this specific test, also pass `--test-args precise_pointer_size_matching.rs`
[00:47:34] error: 1 errors occurred comparing output.
[00:47:34] status: exit code: 1
[00:47:34] status: exit code: 1
[00:47:34] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/precise_pointer_size_matching.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/precise_pointer_size_matching/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/precise_pointer_size_matching/auxiliary" "-A" "unused"
[00:47:34] ------------------------------------------
[00:47:34] 
[00:47:34] ------------------------------------------
[00:47:34] stderr:
[00:47:34] stderr:
[00:47:34] ------------------------------------------
[00:47:34] {"message":"non-exhaustive patterns: `-9223372036854775808isize..=-6isize` and `21isize..=9223372036854775807isize` not covered","code":{"code":"E0004","explanation":"\nThis error indicates that the compiler cannot guarantee a matching pattern for\none or more possible inputs to a match expression. Guaranteed matches are\nrequired in order to assign values to match expressions, or alternatively,\ndetermine the flow of execution. Erroneous code example:\n\n```compile_fail,E0004\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x { // error: non-exhaustive patterns: `HastaLaVistaBaby` not covered\n    Terminator::TalkToMyHand => {}\n}\n```\n\nIf you encounter this error you must alter your patterns so that every possible\nvalue of the input type is matched. For types with a small number of variants\n(like enums) you should probably cover all cases explicitly. Alternatively, the\nunderscore `_` wildcard pattern can be added after all other patterns to match\n\"anything else\". Example:\n\n```\nenum Terminator {\n    HastaLaVistaBaby,\n    TalkToMyHand,\n}\n\nlet x = Terminator::HastaLaVistaBaby;\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    Terminator::HastaLaVistaBaby => {}\n}\n\n// or:\n\nmatch x {\n    Terminator::TalkToMyHand => {}\n    _ => {}\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/precise_pointer_size_matching.rs","byte_start":871,"byte_end":877,"line_start":27,"line_end":27,"column_start":11,"column_end":17,"is_primary":true,"text":[{"text":"    match 0isize { //~ ERROR non-exhaustive patterns","highlight_start":11,"highlight_end":17}],"label":"patterns `-9223372036854775808isize..=-6isize` and `21isize..=9223372036854775807isize` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `-9223372036854775808isize..=-6isize` and `21isize..=9223372036854775807isize` not covered\n  --> /checkout/src/test/ui/precise_pointer_size_matching.rs:27:11\n   |\nLL |     match 0isize { //~ ERROR non-exhaustive patterns\n   |           ^^^^^^ patterns `-9223372036854775808isize..=-6isize` and `21isize..=9223372036854775807isize` not covered\n\n"}
[00:47:34] {"message":"non-exhaustive pze..=18446744073709551615usize` not covered","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0004]: non-exhaustive patterns: `0usize` and `21usize..=18446744073709551615usize` not covered\n  --> /checkout/src/test/ui/precise_pointer_size_matching.rs:32:11\n   |\nLL |     match 0usize { //~ ERROR non-exhaustive patterns\n   |           ^^^^^^ patterns `0usize` and `21usize..=18446744073709551615usize` not covered\n\n"}
[00:47:34] {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[00:47:34] {"message":"For more information about this error, try `rustc --explain E0004`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0004`.\n"}
[00:47:34] ------------------------------------------
[00:47:34] 
[00:47:34] thread '[ui] ui/precise_pointer_size_matching.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3284:9
[00:47:34] 
---
[00:47:34] 
[00:47:34] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:503:22
[00:47:34] 
[00:47:34] 
[00:47:34] 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-5.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -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" "5.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"
[00:47:34] 
[00:47:34] 
[00:47:34] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:47:34] Build completed unsuccessfully in 0:03:48
[00:47:34] Build completed unsuccessfully in 0:03:48
[00:47:34] make: *** [check] Error 1
[00:47:34] Makefile:58: recipe for target 'check' failed

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)

@varkor varkor force-pushed the varkor:stabilise-exhaustive-integer-patterns branch from 944bb2c to 49e4f26 Dec 6, 2018

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Dec 6, 2018

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:036bc6a0:start=1544115320588734196,finish=1544115322713412186,duration=2124677990
$ 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
---
tidy check
[00:03:45] * 568 error codes
[00:03:45] * highest error code: E0721
[00:03:46] * 242 features
[00:03:46] invalid source: "git+https://github.com/rust-lang-nursery/rust-clippy?rev=f5d868c9edfc6c2a9310d564a2f738bec67dfd6b#f5d868c9edfc6c2a9310d564a2f738bec67dfd6b"
[00:03:46] invalid source: "git+https://github.com/rust-lang-nursery/rust-clippy?rev=f5d868c9edfc6c2a9310d564a2f738bec67dfd6b#f5d868c9edfc6c2a9310d564a2f738bec67dfd6b"
[00:03:46] some tidy checks failed
[00:03:46] 
[00:03:46] 
[00:03:46] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:03:46] 
[00:03:46] 
[00:03:46] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:03:46] Build completed unsuccessfully in 0:00:57
[00:03:46] Build completed unsuccessfully in 0:00:57
[00:03:46] Makefile:79: recipe for target 'tidy' failed
[00:03:46] make: *** [tidy] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0456b30a
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Thu Dec  6 16:59:20 UTC 2018
---
travis_time:end:0f1e1310:start=1544115561114356868,finish=1544115561120312768,duration=5955900
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:11c91c9c
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:003890d0
travis_time:start:003890d0
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:05d53320
$ dmesg | grep -i kill

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)

@kennytm

This comment has been minimized.

Copy link
Member

kennytm commented Dec 6, 2018

@varkor Please rebase on the latest master. Or perhaps just close this and open a new PR as the stabilization itself is contained in #56557 already.

@varkor

This comment has been minimized.

Copy link
Member Author

varkor commented Dec 6, 2018

I've submitted #56567 as a follow up issue and I'll close this PR.

@varkor varkor closed this Dec 6, 2018

Centril added a commit to Centril/rust that referenced this pull request Dec 22, 2018

Rollup merge of rust-lang#57052 - Centril:fix-eip-stable-version, r=v…
…arkor

Fix stabilization version numbers (exhaustive_integer_patterns + macro_literal_matcher)

+ `exhaustive_integer_patterns` slipped 1.32; merged in 1.33 -- rust-lang#56362
+ `macro_literal_matcher` isn't stable on current stable (1.31) but is on beta (1.32).

r? @varkor

kennytm added a commit to kennytm/rust that referenced this pull request Dec 22, 2018

Rollup merge of rust-lang#57052 - Centril:fix-eip-stable-version, r=v…
…arkor

Fix stabilization version numbers (exhaustive_integer_patterns + macro_literal_matcher)

+ `exhaustive_integer_patterns` slipped 1.32; merged in 1.33 -- rust-lang#56362
+ `macro_literal_matcher` isn't stable on current stable (1.31) but is on beta (1.32).

r? @varkor

kennytm added a commit to kennytm/rust that referenced this pull request Dec 22, 2018

Rollup merge of rust-lang#57052 - Centril:fix-eip-stable-version, r=v…
…arkor

Fix stabilization version numbers (exhaustive_integer_patterns + macro_literal_matcher)

+ `exhaustive_integer_patterns` slipped 1.32; merged in 1.33 -- rust-lang#56362
+ `macro_literal_matcher` isn't stable on current stable (1.31) but is on beta (1.32).

r? @varkor

kennytm added a commit to kennytm/rust that referenced this pull request Dec 22, 2018

Rollup merge of rust-lang#57052 - Centril:fix-eip-stable-version, r=v…
…arkor

Fix stabilization version numbers (exhaustive_integer_patterns + macro_literal_matcher)

+ `exhaustive_integer_patterns` slipped 1.32; merged in 1.33 -- rust-lang#56362
+ `macro_literal_matcher` isn't stable on current stable (1.31) but is on beta (1.32).

r? @varkor

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Mar 3, 2019

he
Update rust to version 1.33.0.
Pkgsrc changes:
 * Bump required rust version to build to 1.32.0.
 * Adapt patches to changed file locations.
 * Since we now patch some more vendor/ modules, doctor the corresponding
   .cargo-checksum.json files accordingly

Upstream changes:

Version 1.33.0 (2019-02-28)
==========================

Language
--------
- [You can now use the `cfg(target_vendor)` attribute.][57465] E.g.
  `#[cfg(target_vendor="apple")] fn main() { println!("Hello Apple!"); }`
- [Integer patterns such as in a match expression can now be exhaustive.][56362]
  E.g. You can have match statement on a `u8` that covers `0..=255` and
  you would no longer be required to have a `_ => unreachable!()` case.
- [You can now have multiple patterns in `if let` and `while let`
  expressions.][57532] You can do this with the same syntax as a `match`
  expression. E.g.
  ```rust
  enum Creature {
      Crab(String),
      Lobster(String),
      Person(String),
  }

  fn main() {
      let state = Creature::Crab("Ferris");

      if let Creature::Crab(name) | Creature::Person(name) = state {
          println!("This creature's name is: {}", name);
      }
  }
  ```
- [You can now have irrefutable `if let` and `while let` patterns.][57535]
  Using this feature will by default produce a warning as this behaviour
  can be unintuitive. E.g. `if let _ = 5 {}`
- [You can now use `let` bindings, assignments, expression statements,
  and irrefutable pattern destructuring in const functions.][57175]
- [You can now call unsafe const functions.][57067] E.g.
  ```rust
  const unsafe fn foo() -> i32 { 5 }
  const fn bar() -> i32 {
      unsafe { foo() }
  }
  ```
- [You can now specify multiple attributes in a `cfg_attr` attribute.][57332]
  E.g. `#[cfg_attr(all(), must_use, optimize)]`
- [You can now specify a specific alignment with the `#[repr(packed)]`
  attribute.][57049] E.g. `#[repr(packed(2))] struct Foo(i16, i32);` is a
  struct with an alignment of 2 bytes and a size of 6 bytes.
- [You can now import an item from a module as an `_`.][56303] This allows you
  to import a trait's impls, and not have the name in the namespace. E.g.
  ```rust
  use std::io::Read as _;

  // Allowed as there is only one `Read` in the module.
  pub trait Read {}
  ```
- [You may now use `Rc`, `Arc`, and `Pin` as method receivers][56805].

Compiler
--------
- [You can now set a linker flavor for `rustc` with the `-Clinker-flavor`
  command line argument.][56351]
- [The mininum required LLVM version has been bumped to 6.0.][56642]
- [Added support for the PowerPC64 architecture on FreeBSD.][57615]
- [The `x86_64-fortanix-unknown-sgx` target support has been upgraded to
  tier 2 support.][57130] Visit the [platform support][platform-support]
  page for information on Rust's platform support.
- [Added support for the `thumbv7neon-linux-androideabi` and
  `thumbv7neon-unknown-linux-gnueabihf` targets.][56947]
- [Added support for the `x86_64-unknown-uefi` target.][56769]

Libraries
---------
- [The methods `overflowing_{add, sub, mul, shl, shr}` are now `const`
  functions for all numeric types.][57566]
- [The methods `rotate_left`, `rotate_right`, and `wrapping_{add, sub, mul,
  shl, shr}`
  are now `const` functions for all numeric types.][57105]
- [The methods `is_positive` and `is_negative` are now `const` functions for
  all signed numeric types.][57105]
- [The `get` method for all `NonZero` types is now `const`.][57167]
- [The methods `count_ones`, `count_zeros`, `leading_zeros`, `trailing_zeros`,
  `swap_bytes`, `from_be`, `from_le`, `to_be`, `to_le` are now `const` for all
  numeric types.][57234]
- [`Ipv4Addr::new` is now a `const` function][57234]

Stabilized APIs
---------------
- [`unix::FileExt::read_exact_at`]
- [`unix::FileExt::write_all_at`]
- [`Option::transpose`]
- [`Result::transpose`]
- [`convert::identity`]
- [`pin::Pin`]
- [`marker::Unpin`]
- [`marker::PhantomPinned`]
- [`Vec::resize_with`]
- [`VecDeque::resize_with`]
- [`Duration::as_millis`]
- [`Duration::as_micros`]
- [`Duration::as_nanos`]


Cargo
-----
- [Cargo should now rebuild a crate if a file was modified during the initial
  build.][cargo/6484]

Compatibility Notes
-------------------
- The methods `str::{trim_left, trim_right, trim_left_matches,
  trim_right_matches}` are now deprecated in the standard library, and their
  usage will now produce a warning.  Please use the `str::{trim_start,
  trim_end, trim_start_matches, trim_end_matches}` methods instead.
- The `Error::cause` method has been deprecated in favor of `Error::source`
  which supports downcasting.

[55982]: rust-lang/rust#55982
[56303]: rust-lang/rust#56303
[56351]: rust-lang/rust#56351
[56362]: rust-lang/rust#56362
[56642]: rust-lang/rust#56642
[56769]: rust-lang/rust#56769
[56805]: rust-lang/rust#56805
[56947]: rust-lang/rust#56947
[57049]: rust-lang/rust#57049
[57067]: rust-lang/rust#57067
[57105]: rust-lang/rust#57105
[57130]: rust-lang/rust#57130
[57167]: rust-lang/rust#57167
[57175]: rust-lang/rust#57175
[57234]: rust-lang/rust#57234
[57332]: rust-lang/rust#57332
[57465]: rust-lang/rust#57465
[57532]: rust-lang/rust#57532
[57535]: rust-lang/rust#57535
[57566]: rust-lang/rust#57566
[57615]: rust-lang/rust#57615
[cargo/6484]: rust-lang/cargo#6484
[`unix::FileExt::read_exact_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.read_exact_at
[`unix::FileExt::write_all_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.write_all_at
[`Option::transpose`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.transpose
[`Result::transpose`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.transpose
[`convert::identity`]: https://doc.rust-lang.org/std/convert/fn.identity.html
[`pin::Pin`]: https://doc.rust-lang.org/std/pin/struct.Pin.html
[`marker::Unpin`]: https://doc.rust-lang.org/stable/std/marker/trait.Unpin.html
[`marker::PhantomPinned`]: https://doc.rust-lang.org/nightly/std/marker/struct.PhantomPinned.html
[`Vec::resize_with`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.resize_with
[`VecDeque::resize_with`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.resize_with
[`Duration::as_millis`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_millis
[`Duration::as_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_micros
[`Duration::as_nanos`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_nanos
[platform-support]: https://forge.rust-lang.org/platform-support.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.