rust/src/test/ui/lint/lints-in-foreign-macros.rs

22 lines
641 B
Rust
Raw Normal View History

// aux-build:lints-in-foreign-macros.rs
// compile-pass
2018-08-23 23:21:54 +05:30
#![warn(unused_imports)] //~ missing documentation for crate [missing_docs]
2018-08-23 01:56:39 +05:30
#![warn(missing_docs)]
#[macro_use]
extern crate lints_in_foreign_macros;
macro_rules! foo {
() => {use std::string::ToString;} //~ WARN: unused import
}
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 23:21:54 +05:30
baz!(pub fn undocumented() {}); //~ WARN: missing documentation for a function
baz2!(pub fn undocumented2() {}); //~ WARN: missing documentation for a function
fn main() {}