about summary refs log tree commit diff
path: root/src/doc/reference.md
diff options
context:
space:
mode:
authorDaniel Grunwald <daniel@danielgrunwald.de>2015-01-18 21:43:03 +0100
committerDaniel Grunwald <daniel@danielgrunwald.de>2015-01-22 19:55:15 +0100
commitdb013f9f45a3083ccc9dd79299f110ec62e29704 (patch)
tree7a716ac5c0f4082611d34561f5597f8b7c3e92f9 /src/doc/reference.md
parentb7930d93d9b57beaeabfeb43cf78fc8161ecd46c (diff)
downloadrust-db013f9f45a3083ccc9dd79299f110ec62e29704.tar.gz
rust-db013f9f45a3083ccc9dd79299f110ec62e29704.zip
Fix some grammar inconsistencies for the '..' range notation.
Grammar changes:
* allow 'for _ in 1..i {}' (fixes #20241)
* allow 'for _ in 1.. {}' as infinite loop
* prevent use of range notation in contexts where only operators of high
  precedence are expected (fixes #20811)

Parser code cleanup:
* remove RESTRICTION_NO_DOTS
* make AS_PREC const and follow naming convention
* make min_prec inclusive
Diffstat (limited to 'src/doc/reference.md')
-rw-r--r--src/doc/reference.md7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md
index 9ec4708eb2f..768293cba79 100644
--- a/src/doc/reference.md
+++ b/src/doc/reference.md
@@ -3135,18 +3135,17 @@ The precedence of Rust binary operators is ordered as follows, going from
 strong to weak:
 
 ```{.text .precedence}
-* / %
 as
+* / %
 + -
 << >>
 &
 ^
 |
-< > <= >=
-== !=
+== != < > <= >=
 &&
 ||
-=
+= ..
 ```
 
 Operators at the same precedence level are evaluated left-to-right. [Unary