about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2015-09-30 13:42:57 -0400
committerSteve Klabnik <steve@steveklabnik.com>2015-09-30 14:59:05 -0400
commit2a787a23d1834398d5a945f83b54ccbd577d1d3b (patch)
tree068b1376888afd5d186df4f9c68b4b641f8b9da7
parent3e6d7243ae9749eff27fd320cb422e42291e79d4 (diff)
downloadrust-2a787a23d1834398d5a945f83b54ccbd577d1d3b.tar.gz
rust-2a787a23d1834398d5a945f83b54ccbd577d1d3b.zip
Improve identifier defintion in the reference
Fixes #28706
-rw-r--r--src/doc/reference.md9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md
index 8b95a2e539b..73700765b32 100644
--- a/src/doc/reference.md
+++ b/src/doc/reference.md
@@ -76,8 +76,13 @@ An identifier is any nonempty Unicode[^non_ascii_idents] string of the following
 [^non_ascii_idents]: Non-ASCII characters in identifiers are currently feature
   gated. This is expected to improve soon.
 
-- The first character has property `XID_start`
-- The remaining characters have property `XID_continue`
+Either
+   * The first character has property `XID_start`
+   * The remaining characters have property `XID_continue`
+Or
+   * The first character is `_`
+   * The identifier is more than one character, `_` alone is not an identifier
+   * The remaining characters have property `XID_continue`
 
 that does _not_ occur in the set of [keywords][keywords].