bors[bot] b56ad148db
Merge #4857
4857: Fix invalid shorthand initialization diagnostic for tuple structs r=jonas-schievink a=OptimalStrategy

Initializing tuple structs explicitly, like in the example below, produces a "Shorthand struct initialization" diagnostic that leads to a compilation error when applied:
```rust
struct S(usize);

fn main() { 
    let s = S { 0: 0 };  // OK, but triggers the diagnostic
    // let s = S { 0 };  // Compilation error
}
```

This PR adds a check that the field name is not a literal.

Co-authored-by: OptimalStrategy <george@usan-podgornov.com>
Co-authored-by: OptimalStrategy <17456182+OptimalStrategy@users.noreply.github.com>
2020-06-12 14:28:40 +00:00
..
2020-06-11 11:30:06 +02:00
2020-06-11 10:18:53 +00:00
2020-06-11 13:34:09 +02:00
2020-06-12 12:49:30 +00:00
2020-06-11 13:34:09 +02:00