2018-07-17 17:23:03 +00:00
|
|
|
//@ aux-build:lints-in-foreign-macros.rs
|
2020-01-23 00:00:00 +00:00
|
|
|
//@ check-pass
|
2018-07-17 17:23:03 +00:00
|
|
|
|
2020-03-22 19:37:51 +00:00
|
|
|
#![warn(unused_imports)] //~ missing documentation for the crate [missing_docs]
|
2018-08-22 20:26:39 +00:00
|
|
|
#![warn(missing_docs)]
|
2018-07-17 17:23:03 +00:00
|
|
|
|
|
|
|
#[macro_use]
|
|
|
|
extern crate lints_in_foreign_macros;
|
|
|
|
|
|
|
|
macro_rules! foo {
|
|
|
|
() => {use std::string::ToString;} //~ WARN: unused import
|
2018-04-07 10:20:36 +00:00
|
|
|
}
|
2018-07-17 17:23:03 +00:00
|
|
|
|
|
|
|
mod a { foo!(); }
|
|
|
|
mod b { bar!(); }
|
|
|
|
mod c { baz!(use std::string::ToString;); } //~ WARN: unused import
|
|
|
|
mod d { baz2!(use std::string::ToString;); } //~ WARN: unused import
|
2018-08-23 17:51:54 +00:00
|
|
|
baz!(pub fn undocumented() {}); //~ WARN: missing documentation for a function
|
|
|
|
baz2!(pub fn undocumented2() {}); //~ WARN: missing documentation for a function
|
2018-07-17 17:23:03 +00:00
|
|
|
|
|
|
|
fn main() {}
|