mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-09 18:02:19 +00:00
Upgrade to Rust 1.86 and bump MSRV to 1.84 (#17171)
<!-- Thank you for contributing to Ruff! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary I decided to disable the new [`needless_continue`](https://rust-lang.github.io/rust-clippy/master/index.html#needless_continue) rule because I often found the explicit `continue` more readable over an empty block or having to invert the condition of an other branch. ## Test Plan `cargo test` --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
parent
fedd982fd5
commit
8a4158c5f8
135 changed files with 285 additions and 255 deletions
|
@ -273,7 +273,7 @@ fn handle_enclosed_comment<'a>(
|
|||
.any(|token| token.kind() == SimpleTokenKind::LBracket)
|
||||
{
|
||||
return CommentPlacement::Default(comment);
|
||||
};
|
||||
}
|
||||
|
||||
// If there are no additional tokens between the open parenthesis and the comment, then
|
||||
// it should be attached as a dangling comment on the brackets, rather than a leading
|
||||
|
@ -1393,7 +1393,7 @@ fn handle_attribute_comment<'a>(
|
|||
{
|
||||
if comment.start() < right_paren.start() {
|
||||
return CommentPlacement::trailing(attribute.value.as_ref(), comment);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// If the comment precedes the `.`, treat it as trailing _if_ it's on the same line as the
|
||||
|
@ -1648,7 +1648,7 @@ fn handle_pattern_match_mapping_comment<'a>(
|
|||
// like `rest` above, isn't a node.)
|
||||
if comment.following_node().is_some() {
|
||||
return CommentPlacement::Default(comment);
|
||||
};
|
||||
}
|
||||
|
||||
// If there's no rest pattern, no need to do anything special.
|
||||
let Some(rest) = pattern.rest.as_ref() else {
|
||||
|
|
|
@ -363,7 +363,7 @@ pub(super) enum CommentPlacement<'a> {
|
|||
/// Makes the comment a...
|
||||
///
|
||||
/// * [trailing comment] of the [`preceding_node`] if both the [`following_node`] and [`preceding_node`] are not [None]
|
||||
/// and the comment and [`preceding_node`] are only separated by a space (there's no token between the comment and [`preceding_node`]).
|
||||
/// and the comment and [`preceding_node`] are only separated by a space (there's no token between the comment and [`preceding_node`]).
|
||||
/// * [leading comment] of the [`following_node`] if the [`following_node`] is not [None]
|
||||
/// * [trailing comment] of the [`preceding_node`] if the [`preceding_node`] is not [None]
|
||||
/// * [dangling comment] of the [`enclosing_node`].
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue