]> git.lizzy.rs Git - rust.git/commitdiff
address nits
authorAlex Burka <aburka@seas.upenn.edu>
Fri, 18 Mar 2016 23:04:43 +0000 (19:04 -0400)
committerAlex Burka <aburka@seas.upenn.edu>
Thu, 24 Mar 2016 05:42:23 +0000 (01:42 -0400)
src/librustc_front/lowering.rs
src/libsyntax/parse/parser.rs
src/test/compile-fail/impossible_range.rs
src/test/parse-fail/range_inclusive.rs

index a0466de999acfa031431d459c7108cb624ad1644..be1841794512b99fe9c88a66f2e7f2d8f58a9fef 100644 (file)
@@ -142,7 +142,7 @@ fn str_to_ident(&self, s: &'static str) -> hir::Ident {
         }
     }
 
-    // panics if this LoweringContext's NodeIdAssigner is not a Session
+    // Panics if this LoweringContext's NodeIdAssigner is not able to emit diagnostics.
     fn diagnostic(&self) -> &Handler {
         self.id_assigner.diagnostic()
     }
index deda0c59051794b3c14b019e21949f87b6ce0095..4782d3fb3b97c1dcd24ae7b5903c26da989d4186 100644 (file)
@@ -2076,8 +2076,8 @@ pub fn mk_range(&mut self,
         if end.is_none() && limits == RangeLimits::Closed {
             Err(self.span_fatal_help(self.span,
                                      "inclusive range with no end",
-                                     "currently, inclusive ranges must be bounded at the end \
-                                      (`...b` or `a...b`) -- see tracking issue #28237"))
+                                     "inclusive ranges must be bounded at the end \
+                                      (`...b` or `a...b`)"))
         } else {
             Ok(ExprKind::Range(start, end, limits))
         }
@@ -3016,7 +3016,8 @@ pub fn parse_assoc_expr_with(&mut self,
                         this.parse_assoc_expr_with(op.precedence() + 1,
                             LhsExpr::NotYetParsed)
                 }),
-                // no operators are currently handled here
+                // We currently have no non-associative operators that are not handled above by
+                // the special cases. The code is here only for future convenience.
                 Fixity::None => self.with_res(
                     restrictions - Restrictions::RESTRICTION_STMT_EXPR,
                     |this| {
index 169ba44224079c4041fcea9c4a14f5f6d59faa62..94e048fed655eb51b91f277f3adb53042dd3a3a4 100644 (file)
@@ -19,9 +19,9 @@ pub fn main() {
     0..1;
 
     ...; //~ERROR inclusive range with no end
-         //~^HELP 28237
+         //~^HELP bounded at the end
     0...; //~ERROR inclusive range with no end
-          //~^HELP 28237
+          //~^HELP bounded at the end
     ...1;
     0...1;
 }
index be2a63a07bbd6bbec3ae8015826cdfae1f68cf5f..ce97372c668451ab68a2a8a0a39a82059fe1820a 100644 (file)
@@ -14,6 +14,6 @@
 
 pub fn main() {
     for _ in 1... {} //~ERROR inclusive range with no end
-                     //~^HELP 28237
+                     //~^HELP bounded at the end
 }