diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2020-08-09 16:56:47 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2020-08-09 17:12:57 -0700 |
| commit | 9149ec74db635751e204b9793e2ad3ffcad6a849 (patch) | |
| tree | 6e8fc6aa899aec2777ed28adaafffe43bc1c6fe9 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs | |
| parent | 18f3be7704a4ec7976fcd1272c728974243d29bd (diff) | |
| download | rust-9149ec74db635751e204b9793e2ad3ffcad6a849.tar.gz rust-9149ec74db635751e204b9793e2ad3ffcad6a849.zip | |
Tweak conditions for E0026 and E0769
When we have a tuple struct used with struct we don't want to suggest using
the (valid) struct syntax with numeric field names. Instead we want to
suggest the expected syntax.
Given
```rust
fn main() {
match MyOption::MySome(42) {
MyOption::MySome { x: 42 } => (),
_ => (),
}
}
```
We now emit E0769 "tuple variant `MyOption::MySome` written as struct variant"
instead of E0026 "variant `MyOption::MySome` does not have a field named `x`".
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions
