Run rustfmt on nightly to clean up erroneous comments (#5106)

## Summary

This PR runs `rustfmt` with a few nightly options as a one-time fix to
catch some malformatted comments. I ended up just running with:

```toml
condense_wildcard_suffixes = true
edition = "2021"
max_width = 100
normalize_comments = true
normalize_doc_attributes = true
reorder_impl_items = true
unstable_features = true
use_field_init_shorthand = true
```

Since these all seem like reasonable things to fix, so may as well while
I'm here.
This commit is contained in:
Charlie Marsh 2023-06-14 20:19:05 -04:00 committed by GitHub
parent 9ab16fb417
commit 716cab2f19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 49 additions and 34 deletions

View file

@ -1078,23 +1078,29 @@ class A:
walk_expr(self, expr);
self.exit_node();
}
fn visit_expr(&mut self, expr: &Expr) {
self.enter_node(expr);
walk_expr(self, expr);
self.exit_node();
}
fn visit_constant(&mut self, constant: &Constant) {
self.emit(&constant);
}
fn visit_boolop(&mut self, boolop: &Boolop) {
self.emit(&boolop);
}
fn visit_operator(&mut self, operator: &Operator) {
self.emit(&operator);
}
fn visit_unaryop(&mut self, unaryop: &Unaryop) {
self.emit(&unaryop);
}
fn visit_cmpop(&mut self, cmpop: &Cmpop) {
self.emit(&cmpop);
}
@ -1104,51 +1110,61 @@ class A:
walk_comprehension(self, comprehension);
self.exit_node();
}
fn visit_excepthandler(&mut self, excepthandler: &Excepthandler) {
self.enter_node(excepthandler);
walk_excepthandler(self, excepthandler);
self.exit_node();
}
fn visit_format_spec(&mut self, format_spec: &Expr) {
self.enter_node(format_spec);
walk_expr(self, format_spec);
self.exit_node();
}
fn visit_arguments(&mut self, arguments: &Arguments) {
self.enter_node(arguments);
walk_arguments(self, arguments);
self.exit_node();
}
fn visit_arg(&mut self, arg: &Arg) {
self.enter_node(arg);
walk_arg(self, arg);
self.exit_node();
}
fn visit_keyword(&mut self, keyword: &Keyword) {
self.enter_node(keyword);
walk_keyword(self, keyword);
self.exit_node();
}
fn visit_alias(&mut self, alias: &Alias) {
self.enter_node(alias);
walk_alias(self, alias);
self.exit_node();
}
fn visit_withitem(&mut self, withitem: &Withitem) {
self.enter_node(withitem);
walk_withitem(self, withitem);
self.exit_node();
}
fn visit_match_case(&mut self, match_case: &MatchCase) {
self.enter_node(match_case);
walk_match_case(self, match_case);
self.exit_node();
}
fn visit_pattern(&mut self, pattern: &Pattern) {
self.enter_node(pattern);
walk_pattern(self, pattern);
self.exit_node();
}
fn visit_type_ignore(&mut self, type_ignore: &TypeIgnore) {
self.enter_node(type_ignore);
walk_type_ignore(self, type_ignore);