summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/struct-field-numeric-shorthand.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/struct-field-numeric-shorthand.rs')
-rw-r--r--tests/ui/parser/struct-field-numeric-shorthand.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/parser/struct-field-numeric-shorthand.rs b/tests/ui/parser/struct-field-numeric-shorthand.rs
new file mode 100644
index 000000000..645abd9c7
--- /dev/null
+++ b/tests/ui/parser/struct-field-numeric-shorthand.rs
@@ -0,0 +1,9 @@
+struct Rgb(u8, u8, u8);
+
+fn main() {
+ let _ = Rgb { 0, 1, 2 };
+ //~^ ERROR expected identifier, found `0`
+ //~| ERROR expected identifier, found `1`
+ //~| ERROR expected identifier, found `2`
+ //~| ERROR missing fields `0`, `1` and `2` in initializer of `Rgb`
+}