2018-04-27 23:32:00 -05:00
|
|
|
#![feature(decl_macro)]
|
2017-03-24 21:37:55 -05:00
|
|
|
|
|
|
|
mod foo {
|
2020-10-24 20:35:46 -05:00
|
|
|
pub macro m() { Vec::<i32>::new(); ().clone() }
|
2017-03-24 21:37:55 -05:00
|
|
|
fn f() { ::bar::m!(); }
|
|
|
|
}
|
|
|
|
|
|
|
|
#[no_implicit_prelude]
|
|
|
|
mod bar {
|
|
|
|
pub macro m() {
|
|
|
|
Vec::new(); //~ ERROR failed to resolve
|
|
|
|
().clone() //~ ERROR no method named `clone` found
|
|
|
|
}
|
2018-11-02 16:07:56 -05:00
|
|
|
fn f() {
|
|
|
|
::foo::m!();
|
2020-10-24 20:35:46 -05:00
|
|
|
assert!(true);
|
2018-11-02 16:07:56 -05:00
|
|
|
}
|
2017-03-24 21:37:55 -05:00
|
|
|
}
|
2018-08-22 18:19:38 -05:00
|
|
|
|
|
|
|
fn main() {}
|