summaryrefslogtreecommitdiffstats
path: root/src/test/ui/rustdoc/doc-test-attr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/rustdoc/doc-test-attr.rs')
-rw-r--r--src/test/ui/rustdoc/doc-test-attr.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/rustdoc/doc-test-attr.rs b/src/test/ui/rustdoc/doc-test-attr.rs
new file mode 100644
index 000000000..46178ad86
--- /dev/null
+++ b/src/test/ui/rustdoc/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() {}