forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rust-lang#3535 from xiongmao86/issue3417
Try to solve issue 3417.
- Loading branch information
Showing
22 changed files
with
91 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// rustfmt-format_doc_comments: true | ||
// rustfmt-format_code_in_doc_comments: true | ||
|
||
/// Foo | ||
/// | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
tests/source/normalize_doc_attributes_should_not_imply_format_doc_comments.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// rustfmt-normalize_doc_attributes: true | ||
|
||
/// Foo | ||
/// | ||
/// # Example | ||
/// ``` | ||
/// # #![cfg_attr(not(dox), feature(cfg_target_feature, target_feature, stdsimd))] | ||
/// # #![cfg_attr(not(dox), no_std)] | ||
/// fn foo() { } | ||
/// ``` | ||
/// | ||
fn foo() {} | ||
|
||
#[doc = "Bar documents"] | ||
fn bar() {} |
16 changes: 16 additions & 0 deletions
16
tests/source/wrap_comments_should_not_imply_format_doc_comments.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// 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() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// rustfmt-format_doc_comments: true | ||
// rustfmt-format_code_in_doc_comments: true | ||
|
||
/// Foo | ||
/// | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
tests/target/normalize_doc_attributes_should_not_imply_format_doc_comments.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// rustfmt-normalize_doc_attributes: true | ||
|
||
/// Foo | ||
/// | ||
/// # Example | ||
/// ``` | ||
/// # #![cfg_attr(not(dox), feature(cfg_target_feature, target_feature, stdsimd))] | ||
/// # #![cfg_attr(not(dox), no_std)] | ||
/// fn foo() { } | ||
/// ``` | ||
/// | ||
fn foo() {} | ||
|
||
///Bar documents | ||
fn bar() {} |
16 changes: 16 additions & 0 deletions
16
tests/target/wrap_comments_should_not_imply_format_doc_comments.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// 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() {} |