2020-03-04 12:59:10 +00:00
|
|
|
// compile-flags: --edition 2018
|
|
|
|
// aux-build:macro_rules.rs
|
|
|
|
// aux-build:macro_use_helper.rs
|
|
|
|
|
|
|
|
#![allow(clippy::single_component_path_imports)]
|
2020-03-05 18:22:17 +00:00
|
|
|
#![warn(clippy::macro_use_imports)]
|
2020-02-26 12:40:31 +00:00
|
|
|
|
|
|
|
#[macro_use]
|
2020-03-04 12:59:10 +00:00
|
|
|
extern crate macro_use_helper as mac;
|
|
|
|
|
|
|
|
#[macro_use]
|
|
|
|
extern crate clippy_mini_macro_test as mini_mac;
|
|
|
|
|
|
|
|
mod a {
|
|
|
|
#[macro_use]
|
|
|
|
use std::prelude;
|
|
|
|
#[macro_use]
|
|
|
|
use mac;
|
|
|
|
#[macro_use]
|
|
|
|
use mini_mac;
|
|
|
|
#[macro_use]
|
|
|
|
use mac::inner;
|
|
|
|
|
|
|
|
#[derive(ClippyMiniMacroTest)]
|
|
|
|
struct Test;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
pub_macro!();
|
|
|
|
inner_mod!();
|
|
|
|
pub_in_private!(_var);
|
|
|
|
function!();
|
|
|
|
let v: ty_mac!() = Vec::default();
|
|
|
|
|
|
|
|
inner::try_err!();
|
|
|
|
}
|
|
|
|
}
|
2020-02-26 12:40:31 +00:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
println!();
|
|
|
|
}
|