2018-04-07 05:20:36 -05:00
|
|
|
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
2018-07-17 12:23:03 -05:00
|
|
|
// aux-build:lints-in-foreign-macros.rs
|
|
|
|
// compile-pass
|
|
|
|
|
|
|
|
#![warn(unused_imports)]
|
2018-08-22 15:26:39 -05:00
|
|
|
#![warn(missing_docs)]
|
2018-07-17 12:23:03 -05:00
|
|
|
|
|
|
|
#[macro_use]
|
|
|
|
extern crate lints_in_foreign_macros;
|
|
|
|
|
|
|
|
macro_rules! foo {
|
|
|
|
() => {use std::string::ToString;} //~ WARN: unused import
|
2018-04-07 05:20:36 -05:00
|
|
|
}
|
2018-07-17 12:23:03 -05: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-22 15:26:39 -05:00
|
|
|
mod e { baz!(pub fn undocumented() {}); }//~ WARN: missing documentation for a function
|
2018-07-17 12:23:03 -05:00
|
|
|
|
|
|
|
fn main() {}
|