diff options
| author | Caleb Cartwright <caleb.cartwright@outlook.com> | 2021-10-20 00:11:59 -0500 |
|---|---|---|
| committer | Caleb Cartwright <caleb.cartwright@outlook.com> | 2021-10-20 00:11:59 -0500 |
| commit | 714e904969b6ac7c8da446122952e154fd2e8ea7 (patch) | |
| tree | 77c9b0d05b4eaa6dec0e9223efc99cda38505048 /src/tools/rustfmt/tests/source/issue-3158.rs | |
| parent | 42983a28ab3c70728da7a9b932b667c978dd898d (diff) | |
| parent | efa8f5521d3813cc897ba29ea0ef98c7aef66bb6 (diff) | |
| download | rust-714e904969b6ac7c8da446122952e154fd2e8ea7.tar.gz rust-714e904969b6ac7c8da446122952e154fd2e8ea7.zip | |
Merge commit 'efa8f5521d3813cc897ba29ea0ef98c7aef66bb6' into rustfmt-subtree
Diffstat (limited to 'src/tools/rustfmt/tests/source/issue-3158.rs')
| -rw-r--r-- | src/tools/rustfmt/tests/source/issue-3158.rs | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/source/issue-3158.rs b/src/tools/rustfmt/tests/source/issue-3158.rs new file mode 100644 index 00000000000..315073db6af --- /dev/null +++ b/src/tools/rustfmt/tests/source/issue-3158.rs @@ -0,0 +1,74 @@ +// rustfmt-format_code_in_doc_comments: true + +/// Should format +/// ```rust +/// assert!( false ); +/// ``` +/// +/// Should format +/// ```rust,should_panic +/// assert!( false ); +/// ``` +/// +/// Should format +/// ```rust,should_panic,edition2018 +/// assert!( false ); +/// ``` +/// +/// Should format +/// ```rust , should_panic , edition2018 +/// assert!( false ); +/// ``` +/// +/// Should not format +/// ```ignore +/// assert!( false ); +/// ``` +/// +/// Should not format (not all are rust) +/// ```rust,ignore +/// assert!( false ); +/// ``` +/// +/// Should not format (rust compile_fail) +/// ```compile_fail +/// assert!( false ); +/// ``` +/// +/// Should not format (rust compile_fail) +/// ```rust,compile_fail +/// assert!( false ); +/// ``` +/// +/// Various unspecified ones that should format +/// ``` +/// assert!( false ); +/// ``` +/// +/// ```, +/// assert!( false ); +/// ``` +/// +/// ```,,,,, +/// assert!( false ); +/// ``` +/// +/// ```,,, rust ,, +/// assert!( false ); +/// ``` +/// +/// Should not format +/// ```,,, rust , ignore, +/// assert!( false ); +/// ``` +/// +/// Few empty ones +/// ``` +/// ``` +/// +/// ```rust +/// ``` +/// +/// ```ignore +/// ``` +fn foo() {} |
