2020-03-04 06:59:10 -06: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 12:22:17 -06:00
|
|
|
#![warn(clippy::macro_use_imports)]
|
2020-02-26 06:40:31 -06:00
|
|
|
|
|
|
|
#[macro_use]
|
2020-03-04 06:59:10 -06:00
|
|
|
extern crate macro_use_helper as mac;
|
|
|
|
|
|
|
|
#[macro_use]
|
|
|
|
extern crate clippy_mini_macro_test as mini_mac;
|
|
|
|
|
|
|
|
mod a {
|
|
|
|
#[macro_use]
|
|
|
|
use mac;
|
|
|
|
#[macro_use]
|
|
|
|
use mini_mac;
|
|
|
|
#[macro_use]
|
|
|
|
use mac::inner;
|
2020-05-15 07:36:56 -05:00
|
|
|
#[macro_use]
|
|
|
|
use mac::inner::nested;
|
2020-03-04 06:59:10 -06:00
|
|
|
|
|
|
|
#[derive(ClippyMiniMacroTest)]
|
|
|
|
struct Test;
|
|
|
|
|
2020-05-10 08:06:33 -05:00
|
|
|
fn test() {
|
2020-03-04 06:59:10 -06:00
|
|
|
pub_macro!();
|
2020-03-13 17:54:32 -05:00
|
|
|
inner_mod_macro!();
|
|
|
|
pub_in_private_macro!(_var);
|
|
|
|
function_macro!();
|
|
|
|
let v: ty_macro!() = Vec::default();
|
2020-03-04 06:59:10 -06:00
|
|
|
|
|
|
|
inner::try_err!();
|
2020-05-15 07:36:56 -05:00
|
|
|
inner::foofoo!();
|
|
|
|
nested::string_add!();
|
2020-03-04 06:59:10 -06:00
|
|
|
}
|
|
|
|
}
|
2020-02-26 06:40:31 -06:00
|
|
|
|
2020-03-13 17:54:32 -05:00
|
|
|
fn main() {}
|