address nits

This commit is contained in:
Alex Burka 2016-03-18 19:04:43 -04:00
parent 9f899a6659
commit 861644f2af
4 changed files with 8 additions and 7 deletions

View file

@ -142,7 +142,7 @@ impl<'a, 'hir> LoweringContext<'a> {
} }
} }
// 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 { fn diagnostic(&self) -> &Handler {
self.id_assigner.diagnostic() self.id_assigner.diagnostic()
} }

View file

@ -2076,8 +2076,8 @@ impl<'a> Parser<'a> {
if end.is_none() && limits == RangeLimits::Closed { if end.is_none() && limits == RangeLimits::Closed {
Err(self.span_fatal_help(self.span, Err(self.span_fatal_help(self.span,
"inclusive range with no end", "inclusive range with no end",
"currently, inclusive ranges must be bounded at the end \ "inclusive ranges must be bounded at the end \
(`...b` or `a...b`) -- see tracking issue #28237")) (`...b` or `a...b`)"))
} else { } else {
Ok(ExprKind::Range(start, end, limits)) Ok(ExprKind::Range(start, end, limits))
} }
@ -3016,7 +3016,8 @@ impl<'a> Parser<'a> {
this.parse_assoc_expr_with(op.precedence() + 1, this.parse_assoc_expr_with(op.precedence() + 1,
LhsExpr::NotYetParsed) 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( Fixity::None => self.with_res(
restrictions - Restrictions::RESTRICTION_STMT_EXPR, restrictions - Restrictions::RESTRICTION_STMT_EXPR,
|this| { |this| {

View file

@ -19,9 +19,9 @@ pub fn main() {
0..1; 0..1;
...; //~ERROR inclusive range with no end ...; //~ERROR inclusive range with no end
//~^HELP 28237 //~^HELP bounded at the end
0...; //~ERROR inclusive range with no end 0...; //~ERROR inclusive range with no end
//~^HELP 28237 //~^HELP bounded at the end
...1; ...1;
0...1; 0...1;
} }

View file

@ -14,6 +14,6 @@
pub fn main() { pub fn main() {
for _ in 1... {} //~ERROR inclusive range with no end for _ in 1... {} //~ERROR inclusive range with no end
//~^HELP 28237 //~^HELP bounded at the end
} }