2018-07-29 06:51:17 -05:00
|
|
|
#![feature(decl_macro)]
|
2023-03-19 14:11:28 -05:00
|
|
|
#![allow(ambiguous_glob_reexports)]
|
2018-07-29 06:51:17 -05:00
|
|
|
|
|
|
|
macro_rules! define_exported { () => {
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! exported {
|
|
|
|
() => ()
|
|
|
|
}
|
|
|
|
}}
|
|
|
|
macro_rules! define_panic { () => {
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! panic {
|
|
|
|
() => ()
|
|
|
|
}
|
|
|
|
}}
|
|
|
|
macro_rules! define_include { () => {
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! include {
|
|
|
|
() => ()
|
|
|
|
}
|
|
|
|
}}
|
|
|
|
|
|
|
|
use inner1::*;
|
|
|
|
|
|
|
|
mod inner1 {
|
|
|
|
pub macro exported() {}
|
|
|
|
}
|
|
|
|
|
|
|
|
exported!(); //~ ERROR `exported` is ambiguous
|
|
|
|
|
|
|
|
mod inner2 {
|
|
|
|
define_exported!();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
panic!(); //~ ERROR `panic` is ambiguous
|
|
|
|
}
|
|
|
|
|
|
|
|
mod inner3 {
|
|
|
|
define_panic!();
|
|
|
|
}
|
|
|
|
|
|
|
|
mod inner4 {
|
|
|
|
define_include!();
|
|
|
|
}
|
|
|
|
|
|
|
|
include!(); //~ ERROR `include` is ambiguous
|