rust/tests
Stuart Cook efbc8957a6
Rollup merge of #145399 - estebank:resolve-error-wording-2, r=petrochenkov
Unify wording of resolve error

Remove "failed to resolve" from the main error message 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`
```

The intent behind this is to end up with all resolve errors eventually be on the form of

```
error[ECODE]: cannot find `{NAME}` in {SCOPE}
  --> $DIR/file.rs:5:13
   |
LL | #[existent::nonexistent]
   |             ^^^^^^^^^^^ {SPECIFIC LABEL}
```

A category of errors that is interest are those that involve keywords. For example:

```
error[E0433]: cannot find `Self` in this scope
  --> $DIR/issue-97194.rs:2:35
   |
LL |     fn bget(&self, index: [usize; Self::DIM]) -> bool {
   |                                   ^^^^ `Self` is only available in impls, traits, and type definitions
```
and

```
error[E0433]: cannot find `super` in this scope
  --> $DIR/keyword-super.rs:2:9
   |
LL |     let super: isize;
   |         ^^^^^ there are too many leading `super` keywords
```

For these the label provides the actual help, while the message is less informative beyond telling you "couldn't find `name`".

This is an off-shoot of https://github.com/rust-lang/rust/pull/126810 and https://github.com/rust-lang/rust/pull/128086, a subset of the intended changes there with review comments applied.

r? @petrochenkov
2026-02-18 17:29:41 +11:00
..
assembly-llvm Rollup merge of #152404 - durin42:llvm-23-instcombine-shrink-constant, r=Mark-Simulacrum 2026-02-14 22:11:54 +01:00
auxiliary UnsafePinned: implement opsem effects of UnsafeUnpin 2026-02-12 09:09:35 +01:00
build-std/configurations Test that -Zbuild-std=core works on a variety of profiles 2026-01-14 20:39:12 -05:00
codegen-llvm Auto merge of #152605 - scottmcm:box-drop-alignment, r=Mark-Simulacrum 2026-02-15 13:38:45 +00:00
codegen-units add write_box_via_move intrinsic and use it for vec! 2026-02-16 17:27:40 +01:00
coverage coverage: Add a test case for a previously-unknown span mismatch 2026-02-03 22:53:38 +11:00
coverage-run-rustdoc
crashes Revert "Fix an ICE in the vtable iteration for a trait reference" 2026-02-16 17:52:06 -08:00
debuginfo Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
incremental Bless tests 2026-02-11 18:08:18 +09:00
mir-opt add write_box_via_move intrinsic and use it for vec! 2026-02-16 17:27:40 +01:00
pretty Fix pretty print tests with #[prelude_import] 2026-02-12 17:43:58 +00:00
run-make Unify wording of resolve error 2026-02-17 16:51:44 +00:00
run-make-cargo Update cargo submodule 2026-01-30 19:15:24 -05:00
rustdoc-gui Remove the 4 failing tests from rustdoc-gui 2026-02-06 01:13:41 +01:00
rustdoc-html Rollup merge of #151783 - mu001999-contrib:impl/final-method, r=fee1-dead 2026-02-17 13:02:21 +11:00
rustdoc-js rustdoc: sort stable items first 2026-02-13 14:44:41 -06:00
rustdoc-js-std rustdoc: sort stable items first 2026-02-13 14:44:41 -06:00
rustdoc-json resolve: Mark items under ambigous imports as exported 2026-01-27 16:24:53 +03:00
rustdoc-ui Unify wording of resolve error 2026-02-17 16:51:44 +00:00
ui Rollup merge of #145399 - estebank:resolve-error-wording-2, r=petrochenkov 2026-02-18 17:29:41 +11:00
ui-fulldeps Unify wording of resolve error 2026-02-17 16:51:44 +00:00
COMPILER_TESTS.md