chore: Upgrade to Rust 1.60.0
MODIFY
crates/rome_js_parser/docs/authoring_parse_rules.md
crates/rome_js_parser/docs/authoring_parse_rules.md
@@ -135,7 +135,7 @@ impl ParseSeparatedList for ArrayElementsList {
parse_array_element(p)
}
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool {
+ fn is_at_list_end(&self, p: &mut Parser) -> bool {
p.at_ts(token_set![T![default], T![case], T!['}']])
}

MODIFY
crates/rome_js_parser/src/parser/parse_lists.rs
crates/rome_js_parser/src/parser/parse_lists.rs
@@ -30,7 +30,7 @@ pub(crate) trait ParseNodeList {
/// the trait will exit from the loop.
///
/// Usually here you want to check the current token.
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool;
+ fn is_at_list_end(&self, p: &mut Parser) -> bool;
/// This method is used to recover the parser in case [Self::parse_element] returns [ParsedSyntax::Absent]
fn recover(&mut self, p: &mut Parser, parsed_element: ParsedSyntax) -> RecoveryResult;
@@ -92,7 +92,7 @@ pub(crate) trait ParseSeparatedList {
/// the trait will exit from the loop.
///
/// Usually here you want to check the current token.
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool;
+ fn is_at_list_end(&self, p: &mut Parser) -> bool;
/// This method is used to recover the parser in case [Self::parse_element] returns [ParsedSyntax::Absent]
fn recover(&mut self, p: &mut Parser, parsed_element: ParsedSyntax) -> RecoveryResult;

MODIFY
crates/rome_js_parser/src/syntax/class.rs
crates/rome_js_parser/src/syntax/class.rs
@@ -425,7 +425,7 @@ impl ParseNodeList for ClassMembersList {
parse_class_member(p, self.inside_abstract_class)
}
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool {
+ fn is_at_list_end(&self, p: &mut Parser) -> bool {
p.at(T!['}'])
}

MODIFY
crates/rome_js_parser/src/syntax/expr.rs
crates/rome_js_parser/src/syntax/expr.rs
@@ -1518,7 +1518,7 @@ impl ParseSeparatedList for ArrayElementsList {
}
}
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool {
+ fn is_at_list_end(&self, p: &mut Parser) -> bool {
p.at(T![']'])
}

MODIFY
crates/rome_js_parser/src/syntax/jsx/mod.rs
crates/rome_js_parser/src/syntax/jsx/mod.rs
@@ -320,7 +320,7 @@ impl ParseNodeList for JsxChildrenList {
}
}
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool {
+ fn is_at_list_end(&self, p: &mut Parser) -> bool {
let at_l_angle0 = p.at(T![<]);
let at_slash1 = p.nth_at(1, T![/]);
at_l_angle0 && at_slash1
@@ -487,7 +487,7 @@ impl ParseNodeList for JsxAttributeList {
}
}
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool {
+ fn is_at_list_end(&self, p: &mut Parser) -> bool {
matches!(p.cur(), T![>] | T![/] | T![<])
}

MODIFY
crates/rome_js_parser/src/syntax/module.rs
crates/rome_js_parser/src/syntax/module.rs
@@ -350,7 +350,7 @@ impl ParseSeparatedList for NamedImportSpecifierList {
parse_any_named_import_specifier(p)
}
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool {
+ fn is_at_list_end(&self, p: &mut Parser) -> bool {
p.at(T!['}'])
}
@@ -489,7 +489,7 @@ impl ParseSeparatedList for ImportAssertionList {
parse_import_assertion_entry(p, &mut self.assertion_keys)
}
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool {
+ fn is_at_list_end(&self, p: &mut Parser) -> bool {
p.at(T!['}'])
}
@@ -719,7 +719,7 @@ impl ParseSeparatedList for ExportNamedSpecifierList {
parse_any_export_named_specifier(p)
}
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool {
+ fn is_at_list_end(&self, p: &mut Parser) -> bool {
p.at(T!['}'])
}
@@ -985,7 +985,7 @@ impl ParseSeparatedList for ExportNamedFromSpecifierList {
parse_export_named_from_specifier(p)
}
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool {
+ fn is_at_list_end(&self, p: &mut Parser) -> bool {
p.at(T!['}'])
}

MODIFY
crates/rome_js_parser/src/syntax/object.rs
crates/rome_js_parser/src/syntax/object.rs
@@ -38,7 +38,7 @@ impl ParseSeparatedList for ObjectMembersList {
parse_object_member(p)
}
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool {
+ fn is_at_list_end(&self, p: &mut Parser) -> bool {
p.at(T!['}'])
}

MODIFY
crates/rome_js_parser/src/syntax/stmt.rs
crates/rome_js_parser/src/syntax/stmt.rs
@@ -1113,7 +1113,7 @@ impl ParseSeparatedList for VariableDeclaratorList {
})
}
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool {
+ fn is_at_list_end(&self, p: &mut Parser) -> bool {
if self.declarator_context.is_first {
false
} else {
@@ -1613,7 +1613,7 @@ impl ParseNodeList for SwitchCaseStatementList {
parse_statement(p, StatementContext::StatementList)
}
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool {
+ fn is_at_list_end(&self, p: &mut Parser) -> bool {
p.at_ts(token_set![T![default], T![case], T!['}']])
}
@@ -1699,7 +1699,7 @@ impl ParseNodeList for SwitchCasesList {
clause
}
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool {
+ fn is_at_list_end(&self, p: &mut Parser) -> bool {
p.at(T!['}'])
}

MODIFY
crates/rome_js_parser/src/syntax/typescript/statement.rs
crates/rome_js_parser/src/syntax/typescript/statement.rs
@@ -81,7 +81,7 @@ impl ParseSeparatedList for TsEnumMembersList {
parse_ts_enum_member(p)
}
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool {
+ fn is_at_list_end(&self, p: &mut Parser) -> bool {
p.at(T!['}'])
}

MODIFY
crates/rome_js_parser/src/syntax/typescript/types.rs
crates/rome_js_parser/src/syntax/typescript/types.rs
@@ -117,7 +117,7 @@ impl ParseSeparatedList for TsTypeParameterList {
parse_ts_type_parameter(p)
}
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool {
+ fn is_at_list_end(&self, p: &mut Parser) -> bool {
p.at(T![>])
}
@@ -712,7 +712,7 @@ impl ParseNodeList for TypeMembers {
parse_ts_type_member(p)
}
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool {
+ fn is_at_list_end(&self, p: &mut Parser) -> bool {
p.at(T!['}'])
}
@@ -951,7 +951,7 @@ impl ParseSeparatedList for TsTupleTypeElementList {
ty
}
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool {
+ fn is_at_list_end(&self, p: &mut Parser) -> bool {
p.at(T![']'])
}
@@ -1282,7 +1282,7 @@ impl ParseSeparatedList for TypeArgumentsList {
parse_ts_type(p)
}
- fn is_at_list_end(&mut self, p: &mut Parser) -> bool {
+ fn is_at_list_end(&self, p: &mut Parser) -> bool {
p.at(T![>])
}

MODIFY
rust-toolchain.toml
rust-toolchain.toml
# The default profile includes rustc, rust-std, cargo, rust-docs, rustfmt and clippy.
# https://rust-lang.github.io/rustup/concepts/profiles.html
profile = "default"
-channel = "1.59.0"
+channel = "1.60.0"

chore: Upgrade to Rust 1.60.0 (#2373)