mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-23 20:34:06 +00:00
add test ensuring only doc = "" attributes are normalized to comments
The other shapes of doc attributes shouldn't be normalized or modified.
This commit is contained in:
parent
cbc58410d9
commit
0c73b9414b
@ -1,7 +1,13 @@
|
|||||||
// rustfmt-wrap_comments: true
|
// rustfmt-wrap_comments: true
|
||||||
// rustfmt-normalize_doc_attributes: true
|
// rustfmt-normalize_doc_attributes: true
|
||||||
|
|
||||||
|
// Only doc = "" attributes should be normalized
|
||||||
#![doc = "Example doc attribute comment"]
|
#![doc = "Example doc attribute comment"]
|
||||||
|
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||||
|
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||||
|
html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||||
|
html_playground_url = "https://play.rust-lang.org/", test(attr(deny(warnings))))]
|
||||||
|
|
||||||
|
|
||||||
// Long `#[doc = "..."]`
|
// Long `#[doc = "..."]`
|
||||||
struct A { #[doc = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"] b: i32 }
|
struct A { #[doc = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"] b: i32 }
|
||||||
|
@ -1,7 +1,15 @@
|
|||||||
// rustfmt-wrap_comments: true
|
// rustfmt-wrap_comments: true
|
||||||
// rustfmt-normalize_doc_attributes: true
|
// rustfmt-normalize_doc_attributes: true
|
||||||
|
|
||||||
|
// Only doc = "" attributes should be normalized
|
||||||
//! Example doc attribute comment
|
//! Example doc attribute comment
|
||||||
|
#![doc(
|
||||||
|
html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||||
|
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||||
|
html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||||
|
html_playground_url = "https://play.rust-lang.org/",
|
||||||
|
test(attr(deny(warnings)))
|
||||||
|
)]
|
||||||
|
|
||||||
// Long `#[doc = "..."]`
|
// Long `#[doc = "..."]`
|
||||||
struct A {
|
struct A {
|
||||||
|
Loading…
Reference in New Issue
Block a user