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:
@@ -656,7 +656,7 @@ fn handle_positional_only_arguments_separator_comment<'a>(
|
||||
/// Handles comments between the left side and the operator of a binary expression (trailing comments of the left),
|
||||
/// and trailing end-of-line comments that are on the same line as the operator.
|
||||
///
|
||||
///```python
|
||||
/// ```python
|
||||
/// a = (
|
||||
/// 5 # trailing left comment
|
||||
/// + # trailing operator comment
|
||||
|
||||
@@ -257,6 +257,7 @@ impl<'ast> PreorderVisitor<'ast> for CommentsVisitor<'ast> {
|
||||
|
||||
self.finish_node(withitem);
|
||||
}
|
||||
|
||||
fn visit_match_case(&mut self, match_case: &'ast MatchCase) {
|
||||
if self.start_node(match_case).is_traverse() {
|
||||
walk_match_case(self, match_case);
|
||||
|
||||
Reference in New Issue
Block a user