rust/tests/ui/imports/extern-prelude-extern-crate-fail.rs
Esteban Küber c73b3d20c6 Unify wording of resolve error
Remove "failed to resolve" and use the same format we use in other resolution errors "cannot find `name`".

```
error[E0433]: cannot find `nonexistent` in `existent`
  --> $DIR/custom_attr_multisegment_error.rs:5:13
   |
LL | #[existent::nonexistent]
   |             ^^^^^^^^^^^ could not find `nonexistent` in `existent`
```
2026-02-17 16:51:44 +00:00

22 lines
423 B
Rust

//@ aux-build:two_macros.rs
//@ compile-flags:--extern non_existent
mod n {
extern crate two_macros;
}
mod m {
fn check() {
two_macros::m!(); //~ ERROR cannot find
}
}
macro_rules! define_std_as_non_existent {
() => {
extern crate std as non_existent;
//~^ ERROR `extern crate` items cannot shadow names passed with `--extern`
}
}
define_std_as_non_existent!();
fn main() {}