Skip to content
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

Avoid poor-formatting of the rhs of lazy_static macro #4016

Merged
merged 2 commits into from
Feb 19, 2020

Conversation

topecongiro
Copy link
Contributor

  • Parse the rhs as statement
  • Do not format unsafe block on the statement position in a single line

Close #3419.

- Parse the rhs as statement
- Do not format unsafe block on the statement position in a single line
format_visibility, indent_next_line, is_empty_line, mk_sp, remove_trailing_white_spaces,
rewrite_ident, trim_left_preserve_layout, wrap_str, NodeIdExt,
};
use crate::utils::{format_visibility, indent_next_line, is_empty_line, mk_sp, remove_trailing_white_spaces, rewrite_ident, trim_left_preserve_layout, wrap_str, NodeIdExt, count_newlines};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed #4017.

Copy link
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if there was anything pending and/or any review was desired, but FWIW this LGTM!

@topecongiro
Copy link
Contributor Author

@calebcartwright Thanks!

@topecongiro topecongiro merged commit b676fd0 into rust-lang:master Feb 19, 2020
@topecongiro topecongiro deleted the issue-3419 branch February 19, 2020 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Poor formatting of let foo = { bar }
3 participants