-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pretty-printer inserts an extra newline before the first match arm if it has a comment #37199
Comments
eddyb
added a commit
to eddyb/rust
that referenced
this issue
Oct 19, 2016
Fix some pretty printing tests Many pretty-printing tests are un-ignored. Some issues in classification of comments (trailing/isolated) and blank line counting are fixed. Some comments are printed more carefully. Some minor refactoring in pprust.rs `no-pretty-expanded` annotations are removed because this is the default now. `pretty-expanded` annotations are removed from compile-fail tests, they are not tested with pretty-printer. Closes rust-lang#23623 in favor of more specific rust-lang#37201 and rust-lang#37199 r? @nrc
eddyb
added a commit
to eddyb/rust
that referenced
this issue
Oct 19, 2016
Fix some pretty printing tests Many pretty-printing tests are un-ignored. Some issues in classification of comments (trailing/isolated) and blank line counting are fixed. Some comments are printed more carefully. Some minor refactoring in pprust.rs `no-pretty-expanded` annotations are removed because this is the default now. `pretty-expanded` annotations are removed from compile-fail tests, they are not tested with pretty-printer. Closes rust-lang#23623 in favor of more specific rust-lang#37201 and rust-lang#37199 r? @nrc
[pretty] pretty/optional_comma_in_match_arm.rs |
I believe this can be closed. fn main() {
match 0u8 {
// Comment
0 => {}
_ => {}
}
} This code stays just the way it is after I format. |
@r00ster91 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example:
=>
Affected tests:
[pretty] pretty\borrowck\borrowck-pat-enum.rs
[pretty] pretty\issue-11709.rs
[pretty] pretty\issue-28839.rs
The text was updated successfully, but these errors were encountered: