2023-04-20 09:37:15 -05:00
|
|
|
//@aux-build:macro_rules.rs
|
|
|
|
//@aux-build:macro_use_helper.rs
|
2023-04-20 10:19:36 -05:00
|
|
|
//@aux-build:proc_macro_derive.rs:proc-macro
|
2023-07-27 06:40:22 -05:00
|
|
|
|
2023-04-20 09:37:15 -05:00
|
|
|
//@ignore-32bit
|
2020-06-23 10:05:22 -05:00
|
|
|
|
2022-06-25 07:16:32 -05:00
|
|
|
#![feature(lint_reasons)]
|
2021-04-22 04:31:13 -05:00
|
|
|
#![allow(unused_imports, unreachable_code, unused_variables, dead_code, unused_attributes)]
|
2020-06-23 10:05:22 -05:00
|
|
|
#![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-06-23 10:05:22 -05:00
|
|
|
extern crate macro_use_helper as mac;
|
|
|
|
|
|
|
|
#[macro_use]
|
2021-06-03 01:41:37 -05:00
|
|
|
extern crate proc_macro_derive as mini_mac;
|
2020-06-23 10:05:22 -05:00
|
|
|
|
|
|
|
mod a {
|
|
|
|
#[macro_use]
|
|
|
|
use mac;
|
|
|
|
#[macro_use]
|
|
|
|
use mini_mac;
|
|
|
|
#[macro_use]
|
|
|
|
use mac::inner;
|
|
|
|
#[macro_use]
|
|
|
|
use mac::inner::nested;
|
2020-02-26 06:40:31 -06:00
|
|
|
|
2020-06-23 10:05:22 -05:00
|
|
|
#[derive(ClippyMiniMacroTest)]
|
|
|
|
struct Test;
|
|
|
|
|
|
|
|
fn test() {
|
|
|
|
pub_macro!();
|
|
|
|
inner_mod_macro!();
|
|
|
|
pub_in_private_macro!(_var);
|
|
|
|
function_macro!();
|
|
|
|
let v: ty_macro!() = Vec::default();
|
|
|
|
|
|
|
|
inner::try_err!();
|
2023-03-07 08:40:55 -06:00
|
|
|
inner::mut_mut!();
|
2020-06-23 10:05:22 -05:00
|
|
|
nested::string_add!();
|
|
|
|
}
|
2020-02-26 06:40:31 -06:00
|
|
|
}
|
2020-06-23 10:05:22 -05:00
|
|
|
|
2021-12-23 02:12:34 -06:00
|
|
|
// issue #7015, ICE due to calling `module_children` with local `DefId`
|
2021-04-22 04:31:13 -05:00
|
|
|
#[macro_use]
|
|
|
|
use a as b;
|
|
|
|
|
2020-06-23 10:05:22 -05:00
|
|
|
fn main() {}
|