summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/unused/unused-doc-comments-for-macros.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/lint/unused/unused-doc-comments-for-macros.rs')
-rw-r--r--tests/ui/lint/unused/unused-doc-comments-for-macros.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/lint/unused/unused-doc-comments-for-macros.rs b/tests/ui/lint/unused/unused-doc-comments-for-macros.rs
new file mode 100644
index 000000000..05828ebb2
--- /dev/null
+++ b/tests/ui/lint/unused/unused-doc-comments-for-macros.rs
@@ -0,0 +1,17 @@
+#![deny(unused_doc_comments)]
+#![feature(rustc_attrs)]
+
+macro_rules! foo { () => {}; }
+
+fn main() {
+ /// line1 //~ ERROR: unused doc comment
+ /// line2
+ /// line3
+ foo!();
+
+ // Ensure we still detect another doc-comment block.
+ /// line1 //~ ERROR: unused doc comment
+ /// line2
+ /// line3
+ foo!();
+}