2021-04-02 21:35:11 -05:00
|
|
|
// Crate-local macro expanded `macro_export` macros cannot be accessed with module-relative paths.
|
2018-07-29 06:51:17 -05:00
|
|
|
|
2021-04-02 21:35:11 -05:00
|
|
|
macro_rules! define_exported { () => {
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! exported {
|
|
|
|
() => ()
|
2018-07-29 06:51:17 -05:00
|
|
|
}
|
2021-04-02 21:35:11 -05:00
|
|
|
}}
|
2018-07-29 06:51:17 -05:00
|
|
|
|
2021-04-02 21:35:11 -05:00
|
|
|
define_exported!();
|
2018-07-29 06:51:17 -05:00
|
|
|
|
2021-04-02 21:35:11 -05:00
|
|
|
mod m {
|
|
|
|
use exported;
|
|
|
|
//~^ ERROR macro-expanded `macro_export` macros from the current crate cannot
|
|
|
|
//~| WARN this was previously accepted
|
2018-07-29 06:51:17 -05:00
|
|
|
}
|
|
|
|
|
2021-04-02 21:35:11 -05:00
|
|
|
fn main() {
|
|
|
|
::exported!();
|
|
|
|
//~^ ERROR macro-expanded `macro_export` macros from the current crate cannot
|
|
|
|
//~| WARN this was previously accepted
|
2018-07-29 06:51:17 -05:00
|
|
|
}
|