]> git.lizzy.rs Git - rust.git/commitdiff
Add a test for #2414
authortopecongiro <seuchida@gmail.com>
Fri, 23 Feb 2018 13:52:56 +0000 (22:52 +0900)
committertopecongiro <seuchida@gmail.com>
Fri, 23 Feb 2018 13:53:16 +0000 (22:53 +0900)
Closes #2414.

rustfmt-core/tests/source/attrib.rs
rustfmt-core/tests/target/attrib.rs

index 6653dd2daa97f927efe03c2b3fd238f948fa18dd..bffe0f3f16d890d0fd9bc7def1aa991973598069 100644 (file)
@@ -150,3 +150,6 @@ fn attributes_on_statements() {
 // Large derive
 #[derive(Add, Sub, Mul, Div, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Debug, Hash, Serialize, Deserialize)]
 pub struct HP(pub u8);
+
+// Long `#[doc = "..."]`
+struct A { #[doc = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"] b: i32 }
index 43c4f9f327fd6ea5915113212927747c4aee481d..0a3d2bc0b8106506750bbd42f38b0d30bcb9f052 100644 (file)
@@ -152,3 +152,9 @@ fn attributes_on_statements() {
 #[derive(Add, Sub, Mul, Div, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Debug, Hash, Serialize,
          Deserialize)]
 pub struct HP(pub u8);
+
+// Long `#[doc = "..."]`
+struct A {
+    #[doc = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]
+    b: i32,
+}