summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-ui/doctest/doc-test-attr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-ui/doctest/doc-test-attr.rs')
-rw-r--r--tests/rustdoc-ui/doctest/doc-test-attr.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/doctest/doc-test-attr.rs b/tests/rustdoc-ui/doctest/doc-test-attr.rs
new file mode 100644
index 000000000..46178ad86
--- /dev/null
+++ b/tests/rustdoc-ui/doctest/doc-test-attr.rs
@@ -0,0 +1,14 @@
+#![crate_type = "lib"]
+#![deny(invalid_doc_attributes)]
+
+#![doc(test)]
+//~^ ERROR `#[doc(test(...)]` takes a list of attributes
+//~^^ WARN this was previously accepted by the compiler
+#![doc(test = "hello")]
+//~^ ERROR `#[doc(test(...)]` takes a list of attributes
+//~^^ WARN this was previously accepted by the compiler
+#![doc(test(a))]
+//~^ ERROR unknown `doc(test)` attribute `a`
+//~^^ WARN this was previously accepted by the compiler
+
+pub fn foo() {}