Add tests for #3417.

This commit is contained in:
xiongmao86 2019-05-01 16:27:34 +08:00
parent d3ec4609d6
commit a653e30d9f
4 changed files with 63 additions and 0 deletions

View File

@ -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() {}

View File

@ -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() {}

View File

@ -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() {}

View File

@ -0,0 +1,17 @@
// 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() {}