aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-06-12 15:28:40 +0100
committerGitHub <[email protected]>2020-06-12 15:28:40 +0100
commitb56ad148db0c69eb279c225f45d324b4e80e7367 (patch)
treee900043096a53b92b96ea4eec77d158bc4991717 /editors
parentf3d73865d6ce6989018b3ebee8e199853253bfd7 (diff)
parent591b5ec2c15a83fd10da7049b5f3ea1a783d52ed (diff)
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 <[email protected]> Co-authored-by: OptimalStrategy <[email protected]>
Diffstat (limited to 'editors')
0 files changed, 0 insertions, 0 deletions