summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/unused/unused-doc-comments-for-macros.rs
blob: 05828ebb2c3538b71dbe2f7ea8a0ed2766e633ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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!();
}