Skip to content

Commit

Permalink
Little fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
RedDocMD committed Dec 16, 2022
1 parent c4d0c91 commit 4af9e6a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_ast/src/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ impl Token {
}
}

pub fn is_range_seperator(&self) -> bool {
pub fn is_range_separator(&self) -> bool {
[DotDot, DotDotDot, DotDotEq].contains(&self.kind)
}

Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_parse/src/parser/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl<'a> Parser<'a> {
LhsExpr::AttributesParsed(attrs) => Some(attrs),
_ => None,
};
if self.token.is_range_seperator() {
if self.token.is_range_separator() {
return self.parse_prefix_range_expr(attrs);
} else {
self.parse_prefix_expr(attrs)?
Expand Down Expand Up @@ -512,7 +512,7 @@ impl<'a> Parser<'a> {
}

debug_assert!(
self.token.is_range_seperator(),
self.token.is_range_separator(),
"parse_prefix_range_expr: token {:?} is not DotDot/DotDotEq",
self.token
);
Expand Down Expand Up @@ -896,7 +896,7 @@ impl<'a> Parser<'a> {
let has_lifetime = self.token.is_lifetime() && self.look_ahead(1, |t| t != &token::Colon);
let lifetime = has_lifetime.then(|| self.expect_lifetime()); // For recovery, see below.
let (borrow_kind, mutbl) = self.parse_borrow_modifiers(lo);
let expr = if self.token.is_range_seperator() {
let expr = if self.token.is_range_separator() {
self.parse_prefix_range_expr(None)
} else {
self.parse_prefix_expr(None)
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/parser/issue-105634.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// run-pass
// check-pass

fn main() {
let _a = ..;
Expand Down

0 comments on commit 4af9e6a

Please sign in to comment.