diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-09-29 20:34:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-29 20:34:15 +0200 |
| commit | 8109332a4c7a022aaf9d778a59e855c9e91ee9d4 (patch) | |
| tree | 57cdd16913e74f63e1b998b4b9a582be62fe256d /src/libstd/sys/unix/stack_overflow.rs | |
| parent | f34e2b1e7cbbc77d1fadcdb613c3db9c79841e5f (diff) | |
| parent | c861e24e7251fcbf0cbb8b85c676afe6b901f8af (diff) | |
| download | rust-8109332a4c7a022aaf9d778a59e855c9e91ee9d4.tar.gz rust-8109332a4c7a022aaf9d778a59e855c9e91ee9d4.zip | |
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.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
