mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-16 01:25:11 +00:00
Upgrade to Rust 1.80 (#12586)
This commit is contained in:
parent
ee103ffb25
commit
138e70bd5c
29 changed files with 57 additions and 48 deletions
|
@ -785,7 +785,7 @@ impl AstNode for ast::StmtFunctionDef {
|
|||
|
||||
visitor.visit_parameters(parameters);
|
||||
|
||||
for expr in returns {
|
||||
if let Some(expr) = returns {
|
||||
visitor.visit_annotation(expr);
|
||||
}
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ pub fn walk_stmt<'a, V: Visitor<'a> + ?Sized>(visitor: &mut V, stmt: &'a Stmt) {
|
|||
visitor.visit_type_params(type_params);
|
||||
}
|
||||
visitor.visit_parameters(parameters);
|
||||
for expr in returns {
|
||||
if let Some(expr) = returns {
|
||||
visitor.visit_annotation(expr);
|
||||
}
|
||||
visitor.visit_body(body);
|
||||
|
@ -593,10 +593,10 @@ pub fn walk_arguments<'a, V: Visitor<'a> + ?Sized>(visitor: &mut V, arguments: &
|
|||
// Note that the there might be keywords before the last arg, e.g. in
|
||||
// f(*args, a=2, *args2, **kwargs)`, but we follow Python in evaluating first `args` and then
|
||||
// `keywords`. See also [Arguments::arguments_source_order`].
|
||||
for arg in arguments.args.iter() {
|
||||
for arg in &*arguments.args {
|
||||
visitor.visit_expr(arg);
|
||||
}
|
||||
for keyword in arguments.keywords.iter() {
|
||||
for keyword in &*arguments.keywords {
|
||||
visitor.visit_keyword(keyword);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@ pub fn walk_stmt<V: Transformer + ?Sized>(visitor: &V, stmt: &mut Stmt) {
|
|||
visitor.visit_type_params(type_params);
|
||||
}
|
||||
visitor.visit_parameters(parameters);
|
||||
for expr in returns {
|
||||
if let Some(expr) = returns {
|
||||
visitor.visit_annotation(expr);
|
||||
}
|
||||
visitor.visit_body(body);
|
||||
|
@ -579,10 +579,10 @@ pub fn walk_arguments<V: Transformer + ?Sized>(visitor: &V, arguments: &mut Argu
|
|||
// Note that the there might be keywords before the last arg, e.g. in
|
||||
// f(*args, a=2, *args2, **kwargs)`, but we follow Python in evaluating first `args` and then
|
||||
// `keywords`. See also [Arguments::arguments_source_order`].
|
||||
for arg in arguments.args.iter_mut() {
|
||||
for arg in &mut *arguments.args {
|
||||
visitor.visit_expr(arg);
|
||||
}
|
||||
for keyword in arguments.keywords.iter_mut() {
|
||||
for keyword in &mut *arguments.keywords {
|
||||
visitor.visit_keyword(keyword);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue