diff options
| author | bors <bors@rust-lang.org> | 2017-09-24 09:02:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-09-24 09:02:19 +0000 |
| commit | 6f9078745e882b3cdedf058479d9d6d936c6750c (patch) | |
| tree | 2d86c32f4dfd472742a6c422a216db175d0b892b /src/libstd/sys/unix/stack_overflow.rs | |
| parent | acb73dbe8b311eb2ffa640ac3e01795d84159df4 (diff) | |
| parent | def660cad5c77478c28c3d4092e8d17367050935 (diff) | |
| download | rust-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
