chore: update rust-toolchain to 1.63.0
MODIFY
crates/rome_analyze/src/visitor.rs
crates/rome_analyze/src/visitor.rs
+#![allow(rustdoc::broken_intra_doc_links)]
use std::collections::BinaryHeap;
use rome_diagnostics::file::FileId;

MODIFY
crates/rome_cli/tests/snap_test.rs
crates/rome_cli/tests/snap_test.rs
@@ -44,7 +44,7 @@ impl CliSnapshot {
let _ = write!(content, "## `{name}`\n\n");
let _ = write!(content, "```{extension}");
content.push('\n');
- content.push_str(&*file_content);
+ content.push_str(&**file_content);
content.push('\n');
content.push_str("```");
content.push_str("\n\n")
@@ -65,7 +65,7 @@ impl CliSnapshot {
content.push_str("# Emitted Messages\n\n");
for message in &self.messages {
- let message_content = &*message;
+ let message_content = &**message;
// There are some logs that print the timing, and we can't snapshot that message
// otherwise at each run we invalid the previous snapshot.
//

MODIFY
crates/rome_diagnostics/src/diagnostic.rs
crates/rome_diagnostics/src/diagnostic.rs
@@ -9,7 +9,7 @@ use rome_text_edit::*;
/// A diagnostic message that can give information
/// like errors or warnings.
-#[derive(Debug, Clone, PartialEq, Hash)]
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
#[cfg_attr(
feature = "serde",
derive(serde::Serialize, serde::Deserialize, schemars::JsonSchema)
@@ -453,7 +453,7 @@ impl Diagnostic {
/// Everything that can be added to a diagnostic, like
/// a suggestion that will be displayed under the actual error.
-#[derive(Debug, Clone, PartialEq, Hash)]
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
#[cfg_attr(
feature = "serde",
derive(serde::Serialize, serde::Deserialize, schemars::JsonSchema)
@@ -465,7 +465,7 @@ pub struct SubDiagnostic {
}
/// A note or help that is displayed under the diagnostic.
-#[derive(Debug, Clone, PartialEq, Hash)]
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
#[cfg_attr(
feature = "serde",
derive(serde::Serialize, serde::Deserialize, schemars::JsonSchema)

MODIFY
crates/rome_formatter/src/builders.rs
crates/rome_formatter/src/builders.rs
@@ -2131,7 +2131,7 @@ impl<Context> Format<Context> for BestFitting<'_, Context> {
let mut formatted_variants = Vec::with_capacity(variants.len());
for variant in variants {
- buffer.write_fmt(Arguments::from(&*variant))?;
+ buffer.write_fmt(Arguments::from(variant))?;
formatted_variants.push(buffer.take_element());
}

MODIFY
crates/rome_formatter/src/lib.rs
crates/rome_formatter/src/lib.rs
@@ -408,7 +408,7 @@ impl Printed {
/// Public return type of the formatter
pub type FormatResult<F> = Result<F, FormatError>;
-#[derive(Debug, PartialEq, Copy, Clone)]
+#[derive(Debug, PartialEq, Eq, Copy, Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
/// Series of errors encountered during formatting
pub enum FormatError {

MODIFY
crates/rome_js_analyze/src/lib.rs
crates/rome_js_analyze/src/lib.rs
@@ -158,7 +158,7 @@ mod tests {
}
/// Series of errors encountered when running rules on a file
-#[derive(Debug, PartialEq, Clone)]
+#[derive(Debug, PartialEq, Eq, Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum RuleError {
/// The rule with the specified name replaced the root of the file with a node that is not a valid root for that language.

MODIFY
crates/rome_js_analyze/tests/spec_tests.rs
crates/rome_js_analyze/tests/spec_tests.rs
@@ -128,7 +128,7 @@ fn markup_to_string(markup: Markup) -> String {
String::from_utf8(buffer).unwrap()
}
-
+#[allow(clippy::let_and_return)]
fn diagnostic_to_string(name: &str, source: &str, diag: Diagnostic) -> String {
let file = SimpleFile::new(name.into(), source.into());
let text = markup_to_string(markup! {

MODIFY
crates/rome_js_formatter/src/js/auxiliary/case_clause.rs
crates/rome_js_formatter/src/js/auxiliary/case_clause.rs
@@ -36,7 +36,7 @@ impl FormatNodeRule<JsCaseClause> for FormatJsCaseClause {
// Skip inserting an indent block is the consequent is empty to print
// the trailing comments for the case clause inline if there is no
// block to push them into
- return write!(f, [hard_line_break()]);
+ write!(f, [hard_line_break()])
} else if is_first_child_block_stmt {
write![f, [space(), consequent.format()]]
} else {

MODIFY
crates/rome_rowan/src/green/node.rs
crates/rome_rowan/src/green/node.rs
@@ -97,7 +97,7 @@ impl ToOwned for GreenNodeData {
impl Borrow<GreenNodeData> for GreenNode {
#[inline]
fn borrow(&self) -> &GreenNodeData {
- &*self
+ &**self
}
}
@@ -127,14 +127,14 @@ impl fmt::Debug for GreenNodeData {
impl fmt::Debug for GreenNode {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- let data: &GreenNodeData = &*self;
+ let data: &GreenNodeData = &**self;
fmt::Debug::fmt(data, f)
}
}
impl fmt::Display for GreenNode {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- let data: &GreenNodeData = &*self;
+ let data: &GreenNodeData = &**self;
fmt::Display::fmt(data, f)
}
}

MODIFY
crates/rome_rowan/src/green/token.rs
crates/rome_rowan/src/green/token.rs
@@ -62,7 +62,7 @@ impl ToOwned for GreenTokenData {
impl Borrow<GreenTokenData> for GreenToken {
#[inline]
fn borrow(&self) -> &GreenTokenData {
- &*self
+ &**self
}
}
@@ -79,14 +79,14 @@ impl fmt::Debug for GreenTokenData {
impl fmt::Debug for GreenToken {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- let data: &GreenTokenData = &*self;
+ let data: &GreenTokenData = &**self;
fmt::Debug::fmt(data, f)
}
}
impl fmt::Display for GreenToken {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- let data: &GreenTokenData = &*self;
+ let data: &GreenTokenData = &**self;
fmt::Display::fmt(data, f)
}
}

MODIFY
crates/rome_rowan/src/syntax/trivia.rs
crates/rome_rowan/src/syntax/trivia.rs
@@ -630,7 +630,7 @@ impl<L: Language> SyntaxTrivia<L> {
fn print_debug_str<S: AsRef<str>>(text: S, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let text = text.as_ref();
- return if text.len() < 25 {
+ if text.len() < 25 {
write!(f, "{:?}", text)
} else {
for idx in 21..25 {
@@ -640,5 +640,5 @@ fn print_debug_str<S: AsRef<str>>(text: S, f: &mut fmt::Formatter<'_>) -> fmt::R
}
}
write!(f, "")
- };
+ }
}

MODIFY
crates/rome_rowan/src/utility_types.rs
crates/rome_rowan/src/utility_types.rs
@@ -39,8 +39,8 @@ impl<N, T> NodeOrToken<N, T> {
impl<N: Deref, T: Deref> NodeOrToken<N, T> {
pub(crate) fn as_deref(&self) -> NodeOrToken<&N::Target, &T::Target> {
match self {
- NodeOrToken::Node(node) => NodeOrToken::Node(&*node),
- NodeOrToken::Token(token) => NodeOrToken::Token(&*token),
+ NodeOrToken::Node(node) => NodeOrToken::Node(&**node),
+ NodeOrToken::Token(token) => NodeOrToken::Token(&**token),
}
}
}

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.62.0"
+channel = "1.63.0"

MODIFY
xtask/coverage/src/lib.rs
xtask/coverage/src/lib.rs
@@ -33,7 +33,7 @@ pub struct TestResult {
pub test_case: String,
}
-#[derive(Debug, PartialEq, Serialize, Deserialize, Copy, Clone)]
+#[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Copy, Clone)]
pub enum Outcome {
Passed,
Failed,

chore: update rust-toolchain to 1.63.0 (#3053)