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

De-abuse TyKind::Error in exhaustiveness checking #71930

Merged
merged 18 commits into from
May 21, 2020

Conversation

Nadrieril
Copy link
Member

@Nadrieril Nadrieril commented May 5, 2020

Replaces #71074. Context: #70866.

In order to remove the use of TyKind::Error, I had to make sure we skip over those fields whose inhabitedness should not be observed. This is potentially error-prone however, since we must be careful not to mix filtered and unfiltered lists of patterns. I managed to hide away most of the filtering behind a new Fields struct, that I used everywhere relevant. I quite like the result; I think the twin concepts of Constructor and Fields make a good mental model.

As usual, I tried to separate commits that shuffle code around from commits that require more thought to review.

cc @varkor @Centril

@rust-highfive
Copy link
Collaborator

r? @matthewjasper

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 5, 2020
@Nadrieril
Copy link
Member Author

May I request a perf run on this? I'm not confident I managed to preserve performance

@jonas-schievink
Copy link
Contributor

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Contributor

bors commented May 5, 2020

⌛ Trying commit e5667234a7fe2ca921766a197933229586749832 with merge 10bf6df2a72191317fadc1859f3d849707705018...

@rust-highfive
Copy link
Collaborator

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

Click to expand the log.
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/20ec7cb6-41fa-4b62-ad2f-fb8a23ab3d2c.sh

##[section]Finishing: Disable git automatic line ending conversion
##[section]Starting: Checkout rust-lang/rust@refs/pull/71930/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
---
##[command]git remote add origin https://github.com/rust-lang/rust
##[command]git config gc.auto 0
##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
##[command]git config --get-all http.proxy
##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/71930/merge:refs/remotes/pull/71930/merge
---
 ---> cb2676f08729
Step 5/8 : ENV RUST_CONFIGURE_ARGS       --build=x86_64-unknown-linux-gnu       --llvm-root=/usr/lib/llvm-8       --enable-llvm-link-shared       --set rust.thin-lto-import-instr-limit=10
 ---> Using cache
 ---> df25ce111862
Step 6/8 : ENV SCRIPT python2.7 ../x.py test --exclude src/tools/tidy &&            python2.7 ../x.py test src/test/mir-opt --pass=build                                   --target=armv5te-unknown-linux-gnueabi &&            python2.7 ../x.py test src/tools/tidy
 ---> 599b9ac96b27
Step 7/8 : ENV NO_DEBUG_ASSERTIONS=1
 ---> Using cache
 ---> 091087e35a36
---
   Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
   Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
   Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
   Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
   Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
   Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
   Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
   Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
   Compiling rustc_ast_passes v0.0.0 (/checkout/src/librustc_ast_passes)
---
   Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
   Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
   Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
   Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
   Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
   Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
   Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
   Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
   Compiling rustc_ast_passes v0.0.0 (/checkout/src/librustc_ast_passes)
---
......................i............................................................................. 1800/9988
.................................................................................................... 1900/9988
.......................................i............................................................ 2000/9988
.................................................................................................... 2100/9988
.............................iiiii.................................................................. 2200/9988
.................................................................................................... 2400/9988
.................................................................................................... 2500/9988
.................................................................................................... 2600/9988
.................................................................................................... 2700/9988
---
................i...............i................................................................... 5100/9988
.................................................................................................... 5200/9988
..............................................................i..................................... 5300/9988
.....................................................i.............................................. 5400/9988
.........................................................ii.ii........i...i......................... 5500/9988
..................................................................................................i. 5600/9988
....i............................................................................................... 5800/9988
........................................ii.....................................i.................... 5900/9988
.................................................................................................... 6000/9988
.................................................................................................... 6100/9988
.................................................................................................... 6100/9988
............................................................................ii...i..ii...........i.. 6200/9988
.................................................................................................... 6400/9988
.................................................................................................... 6500/9988
.................................................................................................... 6600/9988
.................................................................................................... 6600/9988
........i..ii....................................................................................... 6700/9988
.................................................................................................... 6900/9988
.........i.......................................................................................... 7000/9988
.................................................................................................... 7100/9988
...................................................i................................................ 7200/9988
---
.................................................................................................... 7900/9988
.................................................................................................... 8000/9988
.................................................................................................... 8100/9988
...................i................................................................................ 8200/9988
.........................................................................iiiiii.iiiii..i............ 8300/9988
..........................i......................................................................... 8500/9988
.................................................................................................... 8600/9988
.................................................................................................... 8700/9988
.................................................................................................... 8800/9988
---
---- [run-fail] run-fail/match-disc-bot.rs stdout ----

error: compilation failed!
status: exit code: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/run-fail/match-disc-bot.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail/match-disc-bot/a" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail/match-disc-bot/auxiliary"
------------------------------------------

------------------------------------------
stderr:
---
thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


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/run-fail" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "run-fail" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-8/bin/FileCheck" "--nodejs" "/usr/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "8.0.0" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"


failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
Build completed unsuccessfully in 1:02:08
Build completed unsuccessfully in 1:02:08
== clock drift check ==
  local time: Tue May  5 22:04:42 UTC 2020
  network time: Tue, 05 May 2020 22:04:42 GMT
== end clock drift check ==

##[error]Bash exited with code '1'.
##[section]Finishing: Run build
##[section]Starting: Checkout rust-lang/rust@refs/pull/71930/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: rust-lang/rust (GitHub)
##[section]Finishing: Checkout rust-lang/rust@refs/pull/71930/merge to s
Cleaning up task key
Start cleaning up orphan processes.
Terminate orphan process: pid (4211) (python)
##[section]Finishing: Finalize Job

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 @rust-lang/infra. (Feature Requests)

@bors
Copy link
Contributor

bors commented May 6, 2020

☀️ Try build successful - checks-actions, checks-azure
Build commit: 10bf6df2a72191317fadc1859f3d849707705018 (10bf6df2a72191317fadc1859f3d849707705018)

@rust-timer
Copy link
Collaborator

Queued 10bf6df2a72191317fadc1859f3d849707705018 with parent f8d394e, future comparison URL.

@mark-i-m
Copy link
Member

mark-i-m commented May 6, 2020

cc @eddyb (who I was working with on the tykind::error effort)

@mark-i-m
Copy link
Member

mark-i-m commented May 6, 2020

It looks like the CI failure is a bug:

warning: unreachable arm
 --> /checkout/src/test/run-fail/match-disc-bot.rs:7:17
  |
6 |     match f() {
  |           --- any code following this expression is unreachable
7 |         true => 1,
  |                 ^ unreachable arm
  |
  = note: `#[warn(unreachable_code)]` on by default

error[E0004]: non-exhaustive patterns: `_` not covered
 --> /checkout/src/test/run-fail/match-disc-bot.rs:6:11
  |
6 |     match f() {
  |           ^^^ pattern `_` not covered
  |
  = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
  = note: the matched value is of type `!`

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0004`.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 10bf6df2a72191317fadc1859f3d849707705018, comparison URL.

@mark-i-m
Copy link
Member

mark-i-m commented May 6, 2020

Perf looks neutral

@Nadrieril
Copy link
Member Author

The regression was caused by 624ff54 . The regressed test is as follows:

fn f() -> ! {
    panic!("quux")
}
fn g() -> isize {
    match f() {
        true => 1,
        false => 0,
    }
}

The reason it now fails is because instead of using the type of the first pattern to do our computations, we now use the type of the scrutinee. But that shouldn't make a difference, should it? Somehow here the scrutinee is given the type !; I would expect type inference to give it the type bool though?
In fact, the following variation works. In that one, x is correctly given the type bool, so exhaustiveness works as expected.

fn g() -> isize {
	let x = f();
    match x {
        true => 1,
        false => 0,
    }
}

So I don't think it's my fault; that looks like a type inference issue to me. For context, the type of the scrutinee is retrieved here

let scrut_ty = self.tables.node_type(scrut.hir_id);

@matthewjasper
Copy link
Contributor

node_type should be expr_ty_adjusted(scrut)

@Nadrieril Nadrieril force-pushed the exhaustiveness-remove-tyerr branch from e566723 to a546f29 Compare May 6, 2020 13:23
@Nadrieril
Copy link
Member Author

@matthewjasper Thanks, that was indeed the issue!

@rust-highfive
Copy link
Collaborator

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

Click to expand the log.
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/98ee66e6-9fc3-4f8d-bedc-b090433b2610.sh

##[section]Finishing: Disable git automatic line ending conversion
##[section]Starting: Checkout rust-lang/rust@refs/pull/71930/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
---
##[command]git remote add origin https://github.com/rust-lang/rust
##[command]git config gc.auto 0
##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
##[command]git config --get-all http.proxy
##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/71930/merge:refs/remotes/pull/71930/merge
---
 ---> cb2676f08729
Step 5/8 : ENV RUST_CONFIGURE_ARGS       --build=x86_64-unknown-linux-gnu       --llvm-root=/usr/lib/llvm-8       --enable-llvm-link-shared       --set rust.thin-lto-import-instr-limit=10
 ---> Using cache
 ---> df25ce111862
Step 6/8 : ENV SCRIPT python2.7 ../x.py test --exclude src/tools/tidy &&            python2.7 ../x.py test src/test/mir-opt --pass=build                                   --target=armv5te-unknown-linux-gnueabi &&            python2.7 ../x.py test src/tools/tidy
 ---> 599b9ac96b27
Step 7/8 : ENV NO_DEBUG_ASSERTIONS=1
 ---> Using cache
 ---> 091087e35a36
---
   Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
   Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
   Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
   Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
   Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
   Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
   Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
   Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
   Compiling rustc_ast_passes v0.0.0 (/checkout/src/librustc_ast_passes)
---
  local time: Wed May  6 13:52:51 UTC 2020
  network time: Wed, 06 May 2020 13:52:51 GMT
== end clock drift check ==

##[error]Bash exited with code '1'.
##[section]Finishing: Run build
##[section]Starting: Checkout rust-lang/rust@refs/pull/71930/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: rust-lang/rust (GitHub)
##[section]Finishing: Checkout rust-lang/rust@refs/pull/71930/merge to s
Cleaning up task key
Start cleaning up orphan processes.
Terminate orphan process: pid (3611) (python)
##[section]Finishing: Finalize Job

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 @rust-lang/infra. (Feature Requests)

@Nadrieril
Copy link
Member Author

@matthewjasper Actually, your suggestion regressed this:

fn from(never: !) -> TryFromIntError {
    match never {}
}

Apparently expr_ty_adjusted causes never to get type () here 😕

@mark-i-m
Copy link
Member

mark-i-m commented May 7, 2020

Indeed, we confirmed that this works without 624ff54 in #71939 ... Would it be reasonable to merge this PR without that commit and fix the error in a followup?

@rust-highfive
Copy link
Collaborator

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

Click to expand the log.
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/80a9cd0f-5ee0-429a-9c31-af7ac2c7e311.sh

##[section]Finishing: Disable git automatic line ending conversion
##[section]Starting: Checkout rust-lang/rust@refs/pull/71930/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
---
##[command]git remote add origin https://github.com/rust-lang/rust
##[command]git config gc.auto 0
##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
##[command]git config --get-all http.proxy
##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/71930/merge:refs/remotes/pull/71930/merge
---
 ---> cb2676f08729
Step 5/8 : ENV RUST_CONFIGURE_ARGS       --build=x86_64-unknown-linux-gnu       --llvm-root=/usr/lib/llvm-8       --enable-llvm-link-shared       --set rust.thin-lto-import-instr-limit=10
 ---> Using cache
 ---> df25ce111862
Step 6/8 : ENV SCRIPT python2.7 ../x.py test --exclude src/tools/tidy &&            python2.7 ../x.py test src/test/mir-opt --pass=build                                   --target=armv5te-unknown-linux-gnueabi &&            python2.7 ../x.py test src/tools/tidy
 ---> 599b9ac96b27
Step 7/8 : ENV NO_DEBUG_ASSERTIONS=1
 ---> Using cache
 ---> 091087e35a36
---
   Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
   Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
   Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
   Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
   Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
   Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
   Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
   Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
   Compiling rustc_ast_passes v0.0.0 (/checkout/src/librustc_ast_passes)
---
  local time: Thu May  7 16:38:47 UTC 2020
  network time: Thu, 07 May 2020 16:38:47 GMT
== end clock drift check ==

##[error]Bash exited with code '1'.
##[section]Finishing: Run build
##[section]Starting: Checkout rust-lang/rust@refs/pull/71930/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: rust-lang/rust (GitHub)
##[section]Finishing: Checkout rust-lang/rust@refs/pull/71930/merge to s
Cleaning up task key
Start cleaning up orphan processes.
Terminate orphan process: pid (3960) (python)
##[section]Finishing: Finalize Job

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 @rust-lang/infra. (Feature Requests)

@mark-i-m
Copy link
Member

mark-i-m commented May 7, 2020

 error[E0004]: non-exhaustive patterns: type `()` is non-empty
    --> src/libcore/num/mod.rs:5046:15
     |
5046 |         match never {}
     |               ^^^^^
     |
     = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
     = note: the matched value is of type `()`

error: aborting due to previous error

@Nadrieril
Copy link
Member Author

Yeah I didn't mean to push that yet, I'm still hoping that @matthewjasper might pop in and figure out the arcane invocation needed to get the correct type x)

@Nadrieril Nadrieril force-pushed the exhaustiveness-remove-tyerr branch from 19bfef8 to c6f0947 Compare May 17, 2020 17:28
@Nadrieril
Copy link
Member Author

Nadrieril commented May 17, 2020

@varkor I couldn't reproduce the perf impact locally, so I rebased on current master, but I still don't see it. On my machine I see a consistent ~1% improvement on the unicode_normalization tests :/
I improved the comments as you suggested.

Copy link
Member

@varkor varkor left a comment

Choose a reason for hiding this comment

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

Thanks @Nadrieril, these comments are great :) I spotted one typo, but apart from that, I think this is ready to go.

src/librustc_mir_build/hair/pattern/_match.rs Outdated Show resolved Hide resolved
@varkor
Copy link
Member

varkor commented May 18, 2020

I'm inclined to treat the perf results as negligible, especially if you see an improvement lately, but we'll make sure the PR isn't rolled up, so if it does have an effect, it'll be easier to track down.

@bors rollup=never

Co-authored-by: varkor <github@varkor.com>
@varkor
Copy link
Member

varkor commented May 18, 2020

Thanks! @bors r+

@bors
Copy link
Contributor

bors commented May 18, 2020

📌 Commit 4c6510b has been approved by varkor

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 18, 2020
@Nadrieril
Copy link
Member Author

@varkor Would you mind re-approving, since I edited some comments as per @RalfJung's review?

@RalfJung
Copy link
Member

@bors r=varkor

@bors
Copy link
Contributor

bors commented May 20, 2020

📌 Commit d7e1d5f has been approved by varkor

@bors
Copy link
Contributor

bors commented May 20, 2020

🌲 The tree is currently closed for pull requests below priority 9000, this pull request will be tested once the tree is reopened

@bors
Copy link
Contributor

bors commented May 21, 2020

⌛ Testing commit d7e1d5f with merge 9310e3b...

@bors
Copy link
Contributor

bors commented May 21, 2020

☀️ Test successful - checks-azure
Approved by: varkor
Pushing 9310e3b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 21, 2020
@bors bors merged commit 9310e3b into rust-lang:master May 21, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request May 29, 2020
Exhaustiveness checking: work around type normalization issues

This should resolve rust-lang#72476 and probably rust-lang#72467.
This is a bit hacky but that's actually what the code was doing before rust-lang#71930. I'm essentially reverting rust-lang@e5a2cd5. So despite being hacky, it's been tried and tested (so much so that code relies on it now x)).
Only the third commit does anything interesting.
@Nadrieril Nadrieril deleted the exhaustiveness-remove-tyerr branch November 6, 2020 23:33
@Nadrieril Nadrieril added the A-exhaustiveness-checking Relating to exhaustiveness / usefulness checking of patterns label Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-exhaustiveness-checking Relating to exhaustiveness / usefulness checking of patterns merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants