Esteban Küber 8a167edbca 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-28 09:56:28 -07:00
..
2019-09-26 21:39:56 +01:00
2019-09-26 06:44:57 +02:00
2019-09-28 03:07:31 +02:00
2019-09-25 16:41:05 +02:00
2019-09-26 06:44:57 +02:00
2019-09-26 13:24:41 +02:00
2019-09-25 16:41:05 +02:00