blob: 7d2e5ab6f2b7f673a0fde4a2ae765c3c7066a433 [file] [log] [blame]
#![feature(stmt_expr_attributes)]
#![deny(unused_doc_comments)]
macro_rules! mac {
() => {}
}
/// foo //~ ERROR unused doc comment
mac!();
fn foo() {
/// a //~ ERROR unused doc comment
let x = 12;
/// multi-line //~ unused doc comment
/// doc comment
/// that is unused
match x {
/// c //~ ERROR unused doc comment
1 => {},
_ => {}
}
/// foo //~ ERROR unused doc comment
unsafe {}
#[doc = "foo"] //~ ERROR unused doc comment
#[doc = "bar"] //~ ERROR unused doc comment
3;
/// bar //~ ERROR unused doc comment
mac!();
let x = /** comment */ 47; //~ ERROR unused doc comment
/// dox //~ ERROR unused doc comment
{
}
}
fn main() {
foo();
}