2020-06-07 20:12:35 +00:00
|
|
|
// compile-flags: --edition 2018
|
|
|
|
// aux-build:macro_rules.rs
|
|
|
|
// aux-build:macro_use_helper.rs
|
|
|
|
// run-rustfix
|
2020-06-07 20:25:21 +00:00
|
|
|
// ignore-32bit
|
2020-06-07 20:12:35 +00:00
|
|
|
|
2020-06-07 20:25:21 +00:00
|
|
|
#![allow(unused_imports, unreachable_code, unused_variables, dead_code)]
|
2020-06-07 20:12:35 +00:00
|
|
|
#![allow(clippy::single_component_path_imports)]
|
|
|
|
#![warn(clippy::macro_use_imports)]
|
|
|
|
|
|
|
|
#[macro_use]
|
|
|
|
extern crate macro_use_helper as mac;
|
|
|
|
|
|
|
|
#[macro_use]
|
|
|
|
extern crate clippy_mini_macro_test as mini_mac;
|
|
|
|
|
|
|
|
mod a {
|
|
|
|
use mac::{pub_macro, inner_mod_macro, function_macro, ty_macro, pub_in_private_macro};
|
|
|
|
use mac;
|
|
|
|
use mini_mac::ClippyMiniMacroTest;
|
|
|
|
use mini_mac;
|
|
|
|
use mac::{inner::foofoo, inner::try_err};
|
|
|
|
use mac::inner;
|
|
|
|
use mac::inner::nested::string_add;
|
|
|
|
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!();
|
|
|
|
inner::foofoo!();
|
|
|
|
nested::string_add!();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|