rust/tests/ui/imports/macro-paths.rs

29 lines
386 B
Rust
Raw Normal View History

//@ aux-build:two_macros.rs
2016-11-28 07:57:17 +00:00
extern crate two_macros;
mod foo {
pub mod bar {
pub use two_macros::m;
}
}
fn f() {
use foo::*;
2016-11-28 07:57:17 +00:00
bar::m! { //~ ERROR ambiguous
mod bar { pub use two_macros::m; }
2016-11-28 07:57:17 +00:00
}
}
pub mod baz {
2016-11-28 07:57:17 +00:00
pub use two_macros::m;
}
fn g() {
baz::m! { //~ ERROR ambiguous
mod baz { pub use two_macros::m; }
2016-11-28 07:57:17 +00:00
}
}
fn main() {}