about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2020-08-09 16:56:47 -0700
committerEsteban Küber <esteban@kuber.com.ar>2020-08-09 17:12:57 -0700
commit9149ec74db635751e204b9793e2ad3ffcad6a849 (patch)
tree6e8fc6aa899aec2777ed28adaafffe43bc1c6fe9 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
parent18f3be7704a4ec7976fcd1272c728974243d29bd (diff)
downloadrust-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