rust/src/test
bors a79cffb8b8 Auto merge of #50912 - varkor:exhaustive-integer-matching, r=arielb1
Exhaustive integer matching

This adds a new feature flag `exhaustive_integer_patterns` that enables exhaustive matching of integer types by their values. For example, the following is now accepted:
```rust
#![feature(exhaustive_integer_patterns)]
#![feature(exclusive_range_pattern)]

fn matcher(x: u8) {
  match x { // ok
    0 .. 32 => { /* foo */ }
    32 => { /* bar */ }
    33 ..= 255 => { /* baz */ }
  }
}
```
This matching is permitted on all integer (signed/unsigned and char) types. Sensible error messages are also provided. For example:
```rust
fn matcher(x: u8) {
  match x { //~ ERROR
    0 .. 32 => { /* foo */ }
  }
}
```
results in:
```
error[E0004]: non-exhaustive patterns: `32u8...255u8` not covered
 --> matches.rs:3:9
  |
6 |   match x {
  |         ^ pattern `32u8...255u8` not covered
```

This implements https://github.com/rust-lang/rfcs/issues/1550 for https://github.com/rust-lang/rust/issues/50907. While there hasn't been a full RFC for this feature, it was suggested that this might be a feature that obviously complements the existing exhaustiveness checks (e.g. for `bool`) and so a feature gate would be sufficient for now.
2018-08-22 00:57:00 +00:00
..
auxiliary
codegen Auto merge of #53080 - hermord:rc-opt, r=alexcrichton 2018-08-21 06:40:20 +00:00
codegen-units Fix typos found by codespell. 2018-08-19 17:41:28 +02:00
compile-fail Lift some Sized checks. 2018-08-19 08:07:33 +09:00
compile-fail-fulldeps Auto merge of #53471 - petrochenkov:biattr2, r=oli-obk 2018-08-21 20:33:31 +00:00
debuginfo pretty printing for btreemap 2018-08-15 13:48:10 +09:00
incremental mv codemap source_map 2018-08-19 23:01:01 +02:00
incremental-fulldeps
mir-opt patch up mir-opt tests 2018-07-26 15:12:04 +03:00
parse-fail Rollup merge of #53373 - estebank:unclosed, r=petrochenkov 2018-08-17 00:13:24 +08:00
pretty syntax: gensym the injected std/core extern crates in the Rust 2018 edition. 2018-08-14 07:06:46 +03:00
run-fail Fix typos found by codespell. 2018-08-19 17:41:28 +02:00
run-fail-fulldeps mv (mod) codemap source_map 2018-08-19 23:01:00 +02:00
run-make Auto merge of #53190 - sekineh:thumb-cortex-m, r=jamesmunns 2018-08-17 10:40:25 +00:00
run-make-fulldeps Rollup merge of #53496 - matthiaskrgr:codespell_08_2018, r=varkor 2018-08-21 17:51:49 +08:00
run-pass Auto merge of #53530 - kennytm:rollup, r=kennytm 2018-08-21 16:04:11 +00:00
run-pass-fulldeps Rollup merge of #53370 - jkozlowski:stabilize-macro_vis_matcher, r=cramertj 2018-08-21 17:51:38 +08:00
run-pass-valgrind Implement simple codegen for unsized rvalues. 2018-08-19 08:07:33 +09:00
rustdoc Auto merge of #53439 - GuillaumeGomez:generate-blanket-impls-for-reexported-items, r=QuietMisdreavus 2018-08-21 22:48:21 +00:00
rustdoc-js Update stdsimd to undo an accidental stabilization 2018-07-20 22:34:09 -07:00
rustdoc-ui Rollup merge of #52835 - GuillaumeGomez:ice-rustdoc-links, r=eddyb 2018-08-01 21:46:27 +02:00
rustfix
ui Auto merge of #50912 - varkor:exhaustive-integer-matching, r=arielb1 2018-08-22 00:57:00 +00:00
ui-fulldeps Auto merge of #53471 - petrochenkov:biattr2, r=oli-obk 2018-08-21 20:33:31 +00:00
COMPILER_TESTS.md Link compiler test documentation to rustc-guide 2018-08-10 08:05:48 -06:00