2020-03-04 12:59:10 +00:00
|
|
|
// aux-build:macro_rules.rs
|
|
|
|
// aux-build:macro_use_helper.rs
|
2021-05-27 16:03:13 +00:00
|
|
|
// aux-build:proc_macro_derive.rs
|
2020-06-07 20:12:35 +00:00
|
|
|
// run-rustfix
|
2020-06-07 20:25:21 +00:00
|
|
|
// ignore-32bit
|
2020-03-04 12:59:10 +00:00
|
|
|
|
2021-04-03 02:24:52 +00:00
|
|
|
#![allow(unused_imports, unreachable_code, unused_variables, dead_code, unused_attributes)]
|
2020-03-04 12:59:10 +00:00
|
|
|
#![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]
|
2021-05-27 16:03:13 +00:00
|
|
|
extern crate proc_macro_derive as mini_mac;
|
2020-03-04 12:59:10 +00:00
|
|
|
|
|
|
|
mod a {
|
|
|
|
#[macro_use]
|
|
|
|
use mac;
|
|
|
|
#[macro_use]
|
|
|
|
use mini_mac;
|
|
|
|
#[macro_use]
|
|
|
|
use mac::inner;
|
2020-05-15 12:36:56 +00:00
|
|
|
#[macro_use]
|
|
|
|
use mac::inner::nested;
|
2020-03-04 12:59:10 +00:00
|
|
|
|
|
|
|
#[derive(ClippyMiniMacroTest)]
|
|
|
|
struct Test;
|
|
|
|
|
2020-05-10 13:06:33 +00:00
|
|
|
fn test() {
|
2020-03-04 12:59:10 +00:00
|
|
|
pub_macro!();
|
2020-03-13 22:54:32 +00:00
|
|
|
inner_mod_macro!();
|
|
|
|
pub_in_private_macro!(_var);
|
|
|
|
function_macro!();
|
|
|
|
let v: ty_macro!() = Vec::default();
|
2020-03-04 12:59:10 +00:00
|
|
|
|
|
|
|
inner::try_err!();
|
2020-05-15 12:36:56 +00:00
|
|
|
inner::foofoo!();
|
|
|
|
nested::string_add!();
|
2020-03-04 12:59:10 +00:00
|
|
|
}
|
|
|
|
}
|
2020-02-26 12:40:31 +00:00
|
|
|
|
2021-04-03 02:24:52 +00:00
|
|
|
// issue #7015, ICE due to calling `item_children` with local `DefId`
|
|
|
|
#[macro_use]
|
|
|
|
use a as b;
|
|
|
|
|
2020-03-13 22:54:32 +00:00
|
|
|
fn main() {}
|