about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-09-24 09:02:19 +0000
committerbors <bors@rust-lang.org>2017-09-24 09:02:19 +0000
commit6f9078745e882b3cdedf058479d9d6d936c6750c (patch)
tree2d86c32f4dfd472742a6c422a216db175d0b892b /src/libstd/sys/unix/stack_overflow.rs
parentacb73dbe8b311eb2ffa640ac3e01795d84159df4 (diff)
parentdef660cad5c77478c28c3d4092e8d17367050935 (diff)
downloadrust-6f9078745e882b3cdedf058479d9d6d936c6750c.tar.gz
rust-6f9078745e882b3cdedf058479d9d6d936c6750c.zip
Auto merge of #44786 - thombles:tk/i41314, r=petrochenkov
Improve diagnostics when attempting to match tuple enum variant with struct pattern

Adds an extra note as below to explain that a tuple pattern was probably intended.

```
error[E0026]: variant `X::Y` does not have a field named `data`
  --> src/main.rs:18:16
   |
18 |         X::Y { data } => println!("The data is {}", data)
   |                ^^^^ variant `X::Y` does not have field `data`

error[E0027]: pattern does not mention field `0`
  --> src/main.rs:18:9
   |
18 |         X::Y { data } => println!("The data is {}", data)
   |         ^^^^^^^^^^^^^ missing field `0`
   |
   = note: trying to match a tuple variant with a struct variant pattern
```

Fixes #41314.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions