rust/tests/ui/resolve/issue-24968.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

30 lines
511 B
Rust

// Also includes more Self usages per #93796
fn foo(_: Self) {
//~^ ERROR cannot find type `Self`
}
fn foo2() {
let x: Self;
//~^ ERROR cannot find type `Self`
}
type Foo<T>
where
Self: Clone,
//~^ ERROR cannot find type `Self`
= Vec<T>;
const FOO: Self = 0;
//~^ ERROR cannot find type `Self`
const FOO2: u32 = Self::bar();
//~^ ERROR cannot find `Self`
static FOO_S: Self = 0;
//~^ ERROR cannot find type `Self`
static FOO_S2: u32 = Self::bar();
//~^ ERROR cannot find `Self`
fn main() {}