2023-07-02 23:29:37 +08:00
|
|
|
//@ edition:2015
|
2019-07-08 21:58:42 +03:00
|
|
|
#![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); }
|
2020-08-27 13:27:14 +01:00
|
|
|
//~^ ERROR failed to resolve: use of undeclared crate or module `my_core`
|
2019-07-08 21:58:42 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
a!();
|
|
|
|
|
|
|
|
mod v {
|
|
|
|
// Early resolution.
|
|
|
|
use my_core; //~ ERROR unresolved import `my_core`
|
|
|
|
}
|
|
|
|
mod u {
|
|
|
|
// Late resolution.
|
|
|
|
fn f() { my_core::mem::drop(0); }
|
2020-08-27 13:27:14 +01:00
|
|
|
//~^ ERROR failed to resolve: use of undeclared crate or module `my_core`
|
2019-07-08 21:58:42 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|