mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
30 lines
627 B
Rust
30 lines
627 B
Rust
// edition:2018
|
|
#![feature(decl_macro)]
|
|
|
|
macro a() {
|
|
extern crate core as my_core;
|
|
mod v {
|
|
// Early resolution.
|
|
use my_core; //~ ERROR unresolved import `my_core`
|
|
}
|
|
mod u {
|
|
// Late resolution.
|
|
fn f() { my_core::mem::drop(0); }
|
|
//~^ ERROR failed to resolve: use of undeclared crate or module `my_core`
|
|
}
|
|
}
|
|
|
|
a!();
|
|
|
|
mod v {
|
|
// Early resolution.
|
|
use my_core; //~ ERROR unresolved import `my_core`
|
|
}
|
|
mod u {
|
|
// Late resolution.
|
|
fn f() { my_core::mem::drop(0); }
|
|
//~^ ERROR failed to resolve: use of undeclared crate or module `my_core`
|
|
}
|
|
|
|
fn main() {}
|