-
Notifications
You must be signed in to change notification settings - Fork 888
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
Try to solve issue 3417. #3535
Try to solve issue 3417. #3535
Conversation
src/comment.rs
Outdated
match crate::format_code_block(&self.code_block_buffer, &config) { | ||
Some(ref s) => trim_custom_comment_prefix(&s.snippet), | ||
None => trim_custom_comment_prefix(&self.code_block_buffer), | ||
if config.format_doc_comments() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how to write this if block a better way, please give me suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I wonder how to select multiply lines in the commit view. please give me suggestion.
Setting |
Travis CI build break because of rand crate has format_doc_comments in rustfmt.toml. What should I do next? |
The code change looks good to me @xiongmao86 With the stability guaranty of rustfmt, we can't simply rename the option: rand's build failure is a good example. A possible solution would be to introduce the concept of options "aliases":
@topecongiro What do you think of such a mechanism ? Just improving the |
All of these are unstable options though, so I'd expect it to be fine to play with naming / values until stabilized? |
…in_doc_comments." This reverts commit 6a6924c.
Appveyor build fatal: unable to access 'https://github.com/rust-lang/rustfmt.git/': Could not resolve host: github.com May be failed because of network accessibility. How can I retry testing? |
@RReverser ahah indeed ;oD that comment can be discarded then! |
@RReverser @scampi, then how to deal with rand's option if I switch to And this pull request will separate |
I believe mentioning the name change in the CHANGELOG should be good enough.
Given both options are unstable, nothing needs to be done. The behaviour of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, sorry for the late review.
@RReverser @scampi @topecongiro, Thank you for helping and reviewing my commit. What should I do to get the pull request merge? |
Given the discussion above, I'd say rename the option back to |
…at_code_in_doc_comments."" This reverts commit 97d7216.
Only rand build in Travis CI failed. I think this is probably good to go. @scampi, @topecongiro, What do you think? |
@xiongmao86 Sorry for the late review. LGTM, thanks! |
See rust-lang/rustfmt#3535 for background Signed-off-by: Christopher Maier <[email protected]>
See rust-lang/rustfmt#3535 for background. Signed-off-by: Christopher Maier <[email protected]>
See rust-lang/rustfmt#3535 for background Signed-off-by: Christopher Maier <[email protected]>
See rust-lang/rustfmt#3535 for background Signed-off-by: Christopher Maier <[email protected]>
Add two tests first for #3417. Close #3417.