mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-22 03:15:44 +00:00
Switch to Rust 2024 edition (#18129)
This commit is contained in:
parent
e67b35743a
commit
9ae698fe30
1082 changed files with 4211 additions and 3300 deletions
|
@ -192,7 +192,7 @@ impl std::fmt::Display for ParseErrorType {
|
|||
ParseErrorType::ExpectedToken { found, expected } => {
|
||||
write!(f, "Expected {expected}, found {found}",)
|
||||
}
|
||||
ParseErrorType::Lexical(ref lex_error) => write!(f, "{lex_error}"),
|
||||
ParseErrorType::Lexical(lex_error) => write!(f, "{lex_error}"),
|
||||
ParseErrorType::SimpleStatementsOnSameLine => {
|
||||
f.write_str("Simple statements must be separated by newlines or semicolons")
|
||||
}
|
||||
|
@ -289,7 +289,7 @@ impl std::fmt::Display for ParseErrorType {
|
|||
ParseErrorType::UnexpectedIpythonEscapeCommand => {
|
||||
f.write_str("IPython escape commands are only allowed in `Mode::Ipython`")
|
||||
}
|
||||
ParseErrorType::FStringError(ref fstring_error) => {
|
||||
ParseErrorType::FStringError(fstring_error) => {
|
||||
write!(f, "f-string: {fstring_error}")
|
||||
}
|
||||
ParseErrorType::UnexpectedExpressionToken => {
|
||||
|
@ -864,7 +864,9 @@ impl Display for UnsupportedSyntaxError {
|
|||
) => "Cannot use unparenthesized assignment expression as an element in a set literal",
|
||||
UnsupportedSyntaxErrorKind::UnparenthesizedNamedExpr(
|
||||
UnparenthesizedNamedExprKind::SetComprehension,
|
||||
) => "Cannot use unparenthesized assignment expression as an element in a set comprehension",
|
||||
) => {
|
||||
"Cannot use unparenthesized assignment expression as an element in a set comprehension"
|
||||
}
|
||||
UnsupportedSyntaxErrorKind::ParenthesizedKeywordArgumentName => {
|
||||
"Cannot use parenthesized keyword argument name"
|
||||
}
|
||||
|
@ -894,7 +896,7 @@ impl Display for UnsupportedSyntaxError {
|
|||
self.target_version,
|
||||
changed = self.kind.changed_version(),
|
||||
),
|
||||
}
|
||||
};
|
||||
}
|
||||
UnsupportedSyntaxErrorKind::PositionalOnlyParameter => {
|
||||
"Cannot use positional-only parameter separator"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue