]> git.lizzy.rs Git - rust.git/commitdiff
reference: fix definition of :tt
authorAlex Burka <durka42+github@gmail.com>
Sun, 4 Dec 2016 20:56:51 +0000 (15:56 -0500)
committerAlex Burka <aburka@seas.upenn.edu>
Sun, 4 Dec 2016 20:58:49 +0000 (15:58 -0500)
The reference says that $x:tt matches "either side of the `=>` in macro_rules` which is technically true but completely uninformative. This changes that bullet point to what the book says (a single token or sequence of token trees inside brackets).

src/doc/reference.md

index 8655bab4b21bf23dc82ad476dc3e781a105e3ce4..5d20738a1e3db5c230f544a1507830973567839c 100644 (file)
@@ -603,7 +603,8 @@ syntax named by _designator_. Valid designators are:
 * `ty`: a [type](#types)
 * `ident`: an [identifier](#identifiers)
 * `path`: a [path](#paths)
-* `tt`: either side of the `=>` in macro rules
+* `tt`: a token tree (a single [token](#tokens) or a sequence of token trees surrounded
+  by matching `()`, `[]`, or `{}`)
 * `meta`: the contents of an [attribute](#attributes)
 
 In the transcriber, the