rust/tests/ui/hygiene/extern-prelude-from-opaque-fail.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
627 B
Rust
Raw Normal View History

// edition:2015
#![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 07:27:14 -05:00
//~^ 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); }
2020-08-27 07:27:14 -05:00
//~^ ERROR failed to resolve: use of undeclared crate or module `my_core`
}
fn main() {}