-
Notifications
You must be signed in to change notification settings - Fork 914
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
wrap_comments shouldn't imply format_doc_comments #3417
Comments
What does And is setting |
The description is somewhat vague, but from the included example (https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#format_doc_comments) and own experience, I've assumed it means just formatting code snippets within doc comments, and should work independently from wrapping comment text. |
Reproduce with
// rustfmt-wrap_comments: true
/// Foo
///
/// # Example
/// ```
/// # #![cfg_attr(not(dox), feature(cfg_target_feature, target_feature, stdsimd))]
/// # #![cfg_attr(not(dox), no_std)]
/// fn foo() { }
/// ```
///
fn foo() {}
/// A long commment for wrapping
/// This is a long long long long long long long long long long long long long long long long long long long long sentence.
fn bar() {} Update: |
@RReverser You are correct and that is what it should do. Maybe we can review the description of this option too. |
@RReverser, @scampi: Perhaps change |
@xiongmao86 That sounds reasonable to me. |
This is similar to #3209, but a bit worse IMO: currently setting either
normalize_doc_attributes
orwrap_comments
totrue
impliesformat_doc_comments
as well and reformats docs, even ifformat_doc_comments = false
is explicitly set in the config.The text was updated successfully, but these errors were encountered: