From db013f9f45a3083ccc9dd79299f110ec62e29704 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sun, 18 Jan 2015 21:43:03 +0100 Subject: 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 --- src/doc/reference.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/doc/reference.md') 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 -- cgit 1.4.1-3-g733a5