diff options
| author | Daniel Grunwald <daniel@danielgrunwald.de> | 2015-01-18 21:43:03 +0100 |
|---|---|---|
| committer | Daniel Grunwald <daniel@danielgrunwald.de> | 2015-01-22 19:55:15 +0100 |
| commit | db013f9f45a3083ccc9dd79299f110ec62e29704 (patch) | |
| tree | 7a716ac5c0f4082611d34561f5597f8b7c3e92f9 /src/doc | |
| parent | b7930d93d9b57beaeabfeb43cf78fc8161ecd46c (diff) | |
| download | rust-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')
| -rw-r--r-- | src/doc/reference.md | 7 |
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 |
