summaryrefslogtreecommitdiffstats
path: root/tests/ui/attributes/doc-test-literal.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/attributes/doc-test-literal.rs')
-rw-r--r--tests/ui/attributes/doc-test-literal.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/attributes/doc-test-literal.rs b/tests/ui/attributes/doc-test-literal.rs
new file mode 100644
index 000000000..a06a1afcb
--- /dev/null
+++ b/tests/ui/attributes/doc-test-literal.rs
@@ -0,0 +1,7 @@
+#![deny(warnings)]
+
+#![doc(test(""))]
+//~^ ERROR `#![doc(test(...)]` does not take a literal
+//~^^ WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+
+fn main() {}