rust/src
bors 1f5bc176b0 Auto merge of #80104 - Nadrieril:usefulness-merging, r=varkor
Improve and fix diagnostics of exhaustiveness checking

Primarily, this fixes https://github.com/rust-lang/rust/issues/56379. This also fixes incorrect interactions between or-patterns and slice patterns that I discovered while working on #56379. Those two examples show the incorrect diagnostics:

```rust
match &[][..] {
    [true] => {}
    [true // detected as unreachable but that's not true
        | false, ..] => {}
    _ => {}
}
match (true, None) {
    (true, Some(_)) => {}
    (false, Some(true)) => {}
    (true | false, None | Some(true // should be detected as unreachable
                               | false)) => {}
}
```

I did not measure any perf impact. However, I suspect that [`616ba9f`](https://github.com/rust-lang/rust/pull/80104/commits/616ba9f9f7f5845777a36e1a41a515e6c33a8776) should have a negative impact on large or-patterns. I'll see what the perf run says; I have optimization ideas up my sleeve if needed.

EDIT: I initially had a noticeable perf impact that I thought unavoidable. I then proceeded to avoid it x)

r? `@varkor`
`@rustbot` label +A-exhaustiveness-checking
2020-12-19 19:14:04 +00:00
..
bootstrap Auto merge of #80081 - ehuss:update-cargo, r=Mark-Simulacrum 2020-12-18 19:09:17 +00:00
build_helper Fix even more URLs 2020-11-05 20:11:29 +01:00
ci ci: use 20.04 on x86_64-gnu-nopt builder 2020-12-10 15:04:48 +00:00
doc Fix cargo-binutils link 2020-12-13 19:23:16 +08:00
etc Auto merge of #79235 - ortem:fix-btreemap-gdb-pretty-printer, r=Mark-Simulacrum 2020-12-02 04:12:33 +00:00
librustdoc Auto merge of #80106 - jackh726:binder-refactor-part-2, r=lcnr 2020-12-19 10:13:52 +00:00
llvm-project@8d78ad1389 Update LLVM submodule 2020-12-09 00:00:00 +00:00
test Auto merge of #80104 - Nadrieril:usefulness-merging, r=varkor 2020-12-19 19:14:04 +00:00
tools Auto merge of #80106 - jackh726:binder-refactor-part-2, r=lcnr 2020-12-19 10:13:52 +00:00
README.md
stage0.txt Bump bootstrap compiler version 2020-11-19 19:23:36 -05:00
version bump version to 1.50.0 2020-11-13 09:47:16 +01:00

This directory contains the source code of the rust project, including:

  • The test suite
  • The bootstrapping build system
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.