From f695c5317977e72009ce1212ee7431c8782911ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Br=C3=A1ulio=20Bezerra?= Date: Thu, 30 Nov 2017 00:57:45 -0300 Subject: [PATCH] Union item grammar --- src/items/unions.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/items/unions.md b/src/items/unions.md index 90bce6984..6c64ef82b 100644 --- a/src/items/unions.md +++ b/src/items/unions.md @@ -1,5 +1,10 @@ # Unions +> **Syntax** +> _Union_ : +>    `union` [IDENTIFIER] [_Generics_]? [_WhereClause_]? +> `{`[_StructFields_] `}` + A union declaration uses the same syntax as a struct declaration, except with `union` in place of `struct`. @@ -139,3 +144,8 @@ checking, etc etc etc). More detailed specification for unions, including unstable bits, can be found in [RFC 1897 "Unions v1.2"](https://github.com/rust-lang/rfcs/pull/1897). + +[IDENTIFIER]: identifiers.html +[_Generics_]: items.html#type-parameters +[_WhereClause_]: items.html#type-parameters +[_StructFields_]: items/structs.html