2023-04-23 06:03:09 -05:00
|
|
|
//@aux-build:macro_rules.rs
|
|
|
|
//@aux-build:macro_use_helper.rs
|
2023-08-24 14:32:12 -05:00
|
|
|
//@aux-build:proc_macro_derive.rs
|
2024-08-17 14:38:10 -05:00
|
|
|
//@ignore-bitwidth: 32
|
2022-06-30 03:50:09 -05:00
|
|
|
|
|
|
|
#![allow(unused_imports, unreachable_code, unused_variables, dead_code, unused_attributes)]
|
|
|
|
#![allow(clippy::single_component_path_imports)]
|
|
|
|
#![warn(clippy::macro_use_imports)]
|
|
|
|
|
|
|
|
#[macro_use]
|
|
|
|
extern crate macro_use_helper as mac;
|
|
|
|
|
|
|
|
#[macro_use]
|
|
|
|
extern crate proc_macro_derive as mini_mac;
|
|
|
|
|
|
|
|
mod a {
|
|
|
|
#[expect(clippy::macro_use_imports)]
|
|
|
|
#[macro_use]
|
|
|
|
use mac;
|
|
|
|
#[expect(clippy::macro_use_imports)]
|
|
|
|
#[macro_use]
|
|
|
|
use mini_mac;
|
|
|
|
#[expect(clippy::macro_use_imports)]
|
|
|
|
#[macro_use]
|
|
|
|
use mac::inner;
|
|
|
|
#[expect(clippy::macro_use_imports)]
|
|
|
|
#[macro_use]
|
|
|
|
use mac::inner::nested;
|
|
|
|
|
|
|
|
#[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-24 08:04:35 -05:00
|
|
|
inner::mut_mut!();
|
2022-06-30 03:50:09 -05:00
|
|
|
nested::string_add!();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// issue #7015, ICE due to calling `module_children` with local `DefId`
|
|
|
|
#[macro_use]
|
|
|
|
use a as b;
|
|
|
|
|
|
|
|
fn main() {}
|