Upgrade to Rust 1.80 (#12586)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user