rust/src/test
Mazdak Farrokhzad 8109332a4c
Rollup merge of #64825 - estebank:match-unit, r=Centril
Point at enclosing match when expecting `()` in arm

When encountering code like the following:

```rust
fn main() {
    match 3 {
        4 => 1,
        3 => {
            println!("Yep it maches.");
            2
        }
        _ => 2
    }
    println!("Bye!")
}
```

point at the enclosing `match` expression and suggest ignoring the
returned value:

```
error[E0308]: mismatched types
  --> $DIR/match-needing-semi.rs:8:13
   |
LL | /     match 3 {
LL | |         4 => 1,
LL | |         3 => {
LL | |             2
   | |             ^ expected (), found integer
LL | |         }
LL | |         _ => 2
LL | |     }
   | |     -- help: consider using a semicolon here
   | |_____|
   |       expected this to be `()`
   |
   = note: expected type `()`
              found type `{integer}
```

Fix #40799.
2019-09-29 20:34:15 +02:00
..
assembly
auxiliary
codegen codegen: use "_N" (like for other locals) instead of "argN", for argument names. 2019-09-13 19:25:05 +03:00
codegen-units rustc: Fix mixing crates with different share_generics 2019-09-23 12:29:51 -07:00
compile-fail rustc: Fix mixing crates with different share_generics 2019-09-23 12:29:51 -07:00
debuginfo fix debuginfo/issue22656 with LLDB 8 2019-09-18 10:42:55 -04:00
incremental Ban non-extern rust intrinsics 2019-09-14 11:47:02 -04:00
mir-opt Allow reading non-mutable statics in const prop 2019-09-28 07:51:38 -04:00
pretty Print visibility of macro items 2019-09-15 10:22:13 +01:00
run-fail [const-prop] Replace CheckedBinaryOp handling with use of InterpCx 2019-09-27 20:11:12 -04:00
run-make Add very simple edition check to tidy; and add missing edition = 2018s. 2019-07-30 01:56:03 +08:00
run-make-fulldeps Remove tx_to_llvm_workers from TyCtxt 2019-09-25 16:57:27 -04:00
run-pass-valgrind Remove no-prefer-dynamic from valgrind tests 2019-09-01 10:09:45 -04:00
rustdoc rustc: rely on c_variadic == true instead of CVarArgs in HIR/Ty fn signatures. 2019-09-28 17:39:00 +03:00
rustdoc-js Improve searching in rustdoc and add tests 2019-09-04 21:27:13 +08:00
rustdoc-js-std Improve searching in rustdoc and add tests 2019-09-04 21:27:13 +08:00
rustdoc-ui rustdoc: fix diagnostic with mixed code block styles 2019-09-07 12:21:32 -07:00
rustfix
ui Rollup merge of #64825 - estebank:match-unit, r=Centril 2019-09-29 20:34:15 +02:00
ui-fulldeps syntax: don't keep a redundant c_variadic flag in the AST. 2019-09-28 17:38:59 +03:00
COMPILER_TESTS.md doc: fix broken sentence 2019-08-06 02:36:59 +02:00