]> git.lizzy.rs Git - rust.git/commitdiff
Update tests
authorSeiichi Uchida <seuchida@gmail.com>
Mon, 24 Jul 2017 15:56:09 +0000 (00:56 +0900)
committerSeiichi Uchida <seuchida@gmail.com>
Mon, 24 Jul 2017 15:56:09 +0000 (00:56 +0900)
tests/source/attrib.rs
tests/source/issue-1800.rs [new file with mode: 0644]
tests/target/attrib.rs
tests/target/comment4.rs
tests/target/issue-1800.rs [new file with mode: 0644]

index 361d9fb784cca2b137cdcd7f86e3aa045692f3fd..beabed88510d39c0a2b9115b8b8950de1fc1d1b4 100644 (file)
@@ -91,3 +91,20 @@ fn issue_1799() {
     // https://github.com/rust-lang/rust/issues/43336
     Some( Err(error) ) ;
 }
+
+// Formatting inner attributes
+fn inner_attributes() {
+    #![ this_is_an_inner_attribute ( foo ) ]
+
+    foo();
+}
+
+impl InnerAttributes() {
+    #![ this_is_an_inner_attribute ( foo ) ]
+
+    fn foo() {}
+}
+
+mod InnerAttributes {
+    #![ this_is_an_inner_attribute ( foo ) ]
+}
diff --git a/tests/source/issue-1800.rs b/tests/source/issue-1800.rs
new file mode 100644 (file)
index 0000000..eae2265
--- /dev/null
@@ -0,0 +1,3 @@
+#![doc(html_root_url    =    "http://example.com")]
+#[cfg(feature    =    "foo")]
+fn a() {}
index 7ff79b164117bc0609ca8ea41756ff6c8dbe2839..43283d2db057a9d20cbbd0c1a4e3ed9073df739d 100644 (file)
@@ -91,3 +91,20 @@ fn issue_1799() {
     // https://github.com/rust-lang/rust/issues/43336
     Some(Err(error));
 }
+
+// Formatting inner attributes
+fn inner_attributes() {
+    #![this_is_an_inner_attribute(foo)]
+
+    foo();
+}
+
+impl InnerAttributes() {
+    #![this_is_an_inner_attribute(foo)]
+
+    fn foo() {}
+}
+
+mod InnerAttributes {
+    #![this_is_an_inner_attribute(foo)]
+}
index 2916f083ca0fcb5f3f0150e8dae195fd0a5f1b29..516b78c4ec4214892715fc16283cd0826060f4a6 100644 (file)
@@ -1,5 +1,5 @@
-#![allow(dead_code)] // bar
-
+#![allow(dead_code)]
+// bar
 //! Doc comment
 fn test() {
     // comment
diff --git a/tests/target/issue-1800.rs b/tests/target/issue-1800.rs
new file mode 100644 (file)
index 0000000..06c5cfd
--- /dev/null
@@ -0,0 +1,3 @@
+#![doc(html_root_url = "http://example.com")]
+#[cfg(feature = "foo")]
+fn a() {}