mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
21 lines
363 B
Rust
21 lines
363 B
Rust
#![feature(decl_macro)]
|
|
|
|
mod foo {
|
|
pub macro m() { Vec::<i32>::new(); ().clone() }
|
|
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
|
|
}
|
|
fn f() {
|
|
::foo::m!();
|
|
assert!(true);
|
|
}
|
|
}
|
|
|
|
fn main() {}
|