summary refs log tree commit diff
path: root/src/test/ui/useless_comment.rs
blob: 531eec007fc48c46442073f9b8743cb23617dbe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#![deny(unused_doc_comments)]

fn foo() {
    /// a //~ ERROR doc comment not used by rustdoc
    let x = 12;

    /// b //~ doc comment not used by rustdoc
    match x {
        /// c //~ ERROR doc comment not used by rustdoc
        1 => {},
        _ => {}
    }

    /// foo //~ ERROR doc comment not used by rustdoc
    unsafe {}
}

fn main() {
    foo();
}