Skip to content

Commit 861644f

Browse files
committed
address nits
1 parent 9f899a6 commit 861644f

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

src/librustc_front/lowering.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ impl<'a, 'hir> LoweringContext<'a> {
142142
}
143143
}
144144

145-
// panics if this LoweringContext's NodeIdAssigner is not a Session
145+
// Panics if this LoweringContext's NodeIdAssigner is not able to emit diagnostics.
146146
fn diagnostic(&self) -> &Handler {
147147
self.id_assigner.diagnostic()
148148
}

src/libsyntax/parse/parser.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -2076,8 +2076,8 @@ impl<'a> Parser<'a> {
20762076
if end.is_none() && limits == RangeLimits::Closed {
20772077
Err(self.span_fatal_help(self.span,
20782078
"inclusive range with no end",
2079-
"currently, inclusive ranges must be bounded at the end \
2080-
(`...b` or `a...b`) -- see tracking issue #28237"))
2079+
"inclusive ranges must be bounded at the end \
2080+
(`...b` or `a...b`)"))
20812081
} else {
20822082
Ok(ExprKind::Range(start, end, limits))
20832083
}
@@ -3016,7 +3016,8 @@ impl<'a> Parser<'a> {
30163016
this.parse_assoc_expr_with(op.precedence() + 1,
30173017
LhsExpr::NotYetParsed)
30183018
}),
3019-
// no operators are currently handled here
3019+
// We currently have no non-associative operators that are not handled above by
3020+
// the special cases. The code is here only for future convenience.
30203021
Fixity::None => self.with_res(
30213022
restrictions - Restrictions::RESTRICTION_STMT_EXPR,
30223023
|this| {

src/test/compile-fail/impossible_range.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ pub fn main() {
1919
0..1;
2020

2121
...; //~ERROR inclusive range with no end
22-
//~^HELP 28237
22+
//~^HELP bounded at the end
2323
0...; //~ERROR inclusive range with no end
24-
//~^HELP 28237
24+
//~^HELP bounded at the end
2525
...1;
2626
0...1;
2727
}

src/test/parse-fail/range_inclusive.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414

1515
pub fn main() {
1616
for _ in 1... {} //~ERROR inclusive range with no end
17-
//~^HELP 28237
17+
//~^HELP bounded at the end
1818
}
1919

0 commit comments

Comments
 (0)