rust/tests/ui/macro_use_imports.rs

44 lines
891 B
Rust
Raw Normal View History

// compile-flags: --edition 2018
// aux-build:macro_rules.rs
// aux-build:macro_use_helper.rs
// run-rustfix
// ignore-32bit
#![allow(unused_imports, unreachable_code, unused_variables, dead_code)]
#![allow(clippy::single_component_path_imports)]
#![warn(clippy::macro_use_imports)]
2020-02-26 06:40:31 -06:00
#[macro_use]
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;
#[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!();
inner::foofoo!();
nested::string_add!();
}
}
2020-02-26 06:40:31 -06:00
fn main() {}