rust/tests/ui/delegation/impl-reuse-bad-path.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

31 lines
849 B
Rust

#![allow(incomplete_features)]
#![feature(fn_delegation)]
mod unresolved {
struct S;
reuse impl unresolved for S { self.0 }
//~^ ERROR cannot find module or crate `unresolved` in this scope
//~| ERROR cannot find trait `unresolved` in this scope
trait T {}
reuse impl T for unresolved { self.0 }
//~^ ERROR empty glob delegation is not supported
//~| ERROR cannot find type `unresolved` in this scope
}
mod wrong_entities {
trait T {}
struct Trait;
struct S;
reuse impl Trait for S { self.0 }
//~^ ERROR expected trait, found struct `Trait`
//~| ERROR expected trait, found struct `Trait`
mod TraitModule {}
reuse impl TraitModule for S { self.0 }
//~^ ERROR expected trait, found module `TraitModule`
//~| ERROR expected trait, found module `TraitModule`
}
fn main() {}