rust/tests/ui/hygiene/no_implicit_prelude.rs
2023-01-11 09:32:08 +00:00

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() {}