2018-04-27 21:32:00 -07:00
|
|
|
#![feature(decl_macro)]
|
2017-03-25 02:37:55 +00:00
|
|
|
|
|
|
|
mod foo {
|
2020-10-24 18:35:46 -07:00
|
|
|
pub macro m() { Vec::<i32>::new(); ().clone() }
|
2017-03-25 02:37:55 +00: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-03 00:07:56 +03:00
|
|
|
fn f() {
|
|
|
|
::foo::m!();
|
2020-10-24 18:35:46 -07:00
|
|
|
assert!(true);
|
2018-11-03 00:07:56 +03:00
|
|
|
}
|
2017-03-25 02:37:55 +00:00
|
|
|
}
|
2018-08-23 02:19:38 +03:00
|
|
|
|
|
|
|
fn main() {}
|