Upgrade to Rust 1.80 (#12586)

This commit is contained in:
Micha Reiser 2024-07-30 21:18:08 +02:00 committed by GitHub
parent ee103ffb25
commit 138e70bd5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 57 additions and 48 deletions

View file

@ -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);
}

View file

@ -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);
}
}

View file

@ -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);
}
}