rust/tests/ui/imports/local-modularized-tricky-fail-2.rs

23 lines
547 B
Rust
Raw Normal View History

2021-04-02 21:35:11 -05:00
// Crate-local macro expanded `macro_export` macros cannot be accessed with module-relative paths.
2021-04-02 21:35:11 -05:00
macro_rules! define_exported { () => {
#[macro_export]
macro_rules! exported {
() => ()
}
2021-04-02 21:35:11 -05:00
}}
2021-04-02 21:35:11 -05:00
define_exported!();
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
}
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
}