diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-08-11 16:23:54 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-11 16:23:54 +0900 |
| commit | e51a839030931638d8cb3e2b573ed812602d297d (patch) | |
| tree | 6cc980d390dcc496e2331c8d287c7a58063b41fc /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs | |
| parent | a75bdfa230c3ff410693580ddc0ce1a6f2075fe7 (diff) | |
| parent | 9149ec74db635751e204b9793e2ad3ffcad6a849 (diff) | |
| download | rust-e51a839030931638d8cb3e2b573ed812602d297d.tar.gz rust-e51a839030931638d8cb3e2b573ed812602d297d.zip | |
Rollup merge of #75352 - estebank:incorrect-tuple-struct-pat, r=oli-obk
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-sha1.rs')
0 files changed, 0 insertions, 0 deletions
