summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/lints-in-foreign-macros.rs
blob: 1e8b6788a60bb4663370cd5751c444e576f29b2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// aux-build:lints-in-foreign-macros.rs
// check-pass

#![warn(unused_imports)] //~ missing documentation for the crate [missing_docs]
#![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
baz!(pub fn undocumented() {}); //~ WARN: missing documentation for a function
baz2!(pub fn undocumented2() {}); //~ WARN: missing documentation for a function

fn main() {}