rust/compiler
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
..
rustc Return ExitCode from rustc_driver::main 2026-01-23 21:04:27 +00:00
rustc_abi Rollup merge of #152469 - mu001999-contrib:cleanup/unused-features, r=nadrieril,jdonszelmann 2026-02-13 13:34:58 +01:00
rustc_arena Replace some feature(core_intrinsics) with stable hints 2026-02-08 18:21:47 +11:00
rustc_ast Parse and lower final for methods 2026-02-12 15:12:29 +08:00
rustc_ast_ir Implement &pin patterns and ref pin bindings 2025-11-10 09:57:08 +08:00
rustc_ast_lowering Rollup merge of #151783 - mu001999-contrib:impl/final-method, r=fee1-dead 2026-02-17 13:02:21 +11:00
rustc_ast_passes Rollup merge of #151783 - mu001999-contrib:impl/final-method, r=fee1-dead 2026-02-17 13:02:21 +11:00
rustc_ast_pretty Parse and lower final for methods 2026-02-12 15:12:29 +08:00
rustc_attr_parsing Port #![default_lib_allocator] to the new attribute parser 2026-02-16 19:42:12 +00:00
rustc_baked_icu_data Unify the configuration of the compiler docs 2025-11-05 11:25:27 +00:00
rustc_borrowck Rename inline_fluent! to msg! 2026-02-14 13:47:52 +01:00
rustc_builtin_macros Rollup merge of #151783 - mu001999-contrib:impl/final-method, r=fee1-dead 2026-02-17 13:02:21 +11:00
rustc_codegen_cranelift Rollup merge of #152512 - okaneco:exact_integer, r=tgross35 2026-02-17 13:02:22 +11:00
rustc_codegen_gcc add write_box_via_move intrinsic and use it for vec! 2026-02-16 17:27:40 +01:00
rustc_codegen_llvm Remove last remnants of rustc_query_system. 2026-02-16 22:56:47 +11:00
rustc_codegen_ssa Remove code for ThinLTO from cg_gcc 2026-02-15 10:05:48 +00:00
rustc_const_eval Auto merge of #148190 - RalfJung:box_new, r=RalfJung 2026-02-16 18:46:10 +00:00
rustc_data_structures Fix wrong par_slice implementation 2026-02-16 17:49:42 +03:00
rustc_driver Unify the configuration of the compiler docs 2025-11-05 11:25:27 +00:00
rustc_driver_impl Rollup merge of #152250 - JonathanBrouwer:convert_finish, r=jdonszelmann 2026-02-08 19:15:25 +01:00
rustc_error_codes Rollup merge of #152206 - tshepang:misc, r=davidtwco 2026-02-17 13:02:23 +11:00
rustc_error_messages Remove SubdiagMessage in favour of the identical DiagMessage 2026-02-10 09:13:45 +00:00
rustc_errors Rename inline_fluent! to msg! 2026-02-14 13:47:52 +01:00
rustc_expand Rollup merge of #152206 - tshepang:misc, r=davidtwco 2026-02-17 13:02:23 +11:00
rustc_feature remove the issue_5723_bootstrap feature 2026-02-17 10:54:04 +00:00
rustc_fs_util Avoid using env::temp when linking a binary 2025-12-24 06:41:42 +00:00
rustc_graphviz change non-canonical clone impl to {*self}, fix some doc comments 2025-12-20 13:46:22 +00:00
rustc_hashes
rustc_hir Rollup merge of #152728 - Ozzy1423:default-lib, r=JonathanBrouwer 2026-02-17 13:02:25 +11:00
rustc_hir_analysis Rollup merge of #151783 - mu001999-contrib:impl/final-method, r=fee1-dead 2026-02-17 13:02:21 +11:00
rustc_hir_id
rustc_hir_pretty Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
rustc_hir_typeck Rollup merge of #152727 - lcnr:method-ambig-err-taint, r=jackh726 2026-02-17 13:02:25 +11:00
rustc_incremental De-genericize the dep graph. 2026-02-15 13:07:37 +11:00
rustc_index Remove unused features in compiler 2026-02-13 09:25:39 +08:00
rustc_index_macros
rustc_infer Auto merge of #151380 - ShoyuVanilla:shallow-resolve-to-root-var, r=lcnr 2026-02-15 03:04:28 +00:00
rustc_interface Remove wrapper struct QueryCtxt 2026-02-17 17:30:55 +11:00
rustc_lexer Remove rustc_lexer::cursor module. 2026-01-27 12:06:55 +11:00
rustc_lint Port rustc_nonnull_optimization_guaranteed to the new attribute parser 2026-02-16 09:46:04 +01:00
rustc_lint_defs Rollup merge of #152206 - tshepang:misc, r=davidtwco 2026-02-17 13:02:23 +11:00
rustc_llvm Fix multi-cgu+debug builds using autodiff by delaying autodiff till lto 2026-02-11 14:08:56 -05:00
rustc_log
rustc_macros Remove last remnants of rustc_query_system. 2026-02-16 22:56:47 +11:00
rustc_metadata Rollup merge of #152609 - mati865:gnullvm-llvm-dll, r=bjorn3 2026-02-17 14:18:43 +01:00
rustc_middle Remove unnecessary trait HasDepContext 2026-02-17 17:30:56 +11:00
rustc_mir_build add helper to project to a field of a place 2026-02-16 17:27:40 +01:00
rustc_mir_dataflow Stabilize assert_matches 2026-02-11 14:13:44 +01:00
rustc_mir_transform Auto merge of #148190 - RalfJung:box_new, r=RalfJung 2026-02-16 18:46:10 +00:00
rustc_monomorphize Rollup merge of #152329 - Zoxc:simple-parallel-macro, r=nnethercote 2026-02-13 15:19:12 +11:00
rustc_next_trait_solver Rollup merge of #152383 - RalfJung:BikeshedGuaranteedNoDrop, r=TaKO8Ki 2026-02-11 13:48:50 +01:00
rustc_parse Rollup merge of #151783 - mu001999-contrib:impl/final-method, r=fee1-dead 2026-02-17 13:02:21 +11:00
rustc_parse_format rustc_parse_format: improve diagnostics for unsupported debug = syntax 2026-02-06 00:44:03 +05:30
rustc_passes Port #![default_lib_allocator] to the new attribute parser 2026-02-16 19:42:12 +00:00
rustc_pattern_analysis Rollup merge of #152469 - mu001999-contrib:cleanup/unused-features, r=nadrieril,jdonszelmann 2026-02-13 13:34:58 +01:00
rustc_privacy Rollup merge of #151887 - scottmcm:homogeneous-try-in-compiler, r=jackh726 2026-02-08 16:58:23 +11:00
rustc_proc_macro Update literal-escaper version to 0.0.7 2026-01-08 14:10:33 +01:00
rustc_public Rollup merge of #150271 - Jamesbarford:chore/refactor-struct-placeholder-pt2, r=lcnr 2026-01-29 17:47:29 +01:00
rustc_public_bridge Remove unused features in compiler 2026-02-13 09:25:39 +08:00
rustc_query_impl Don't use HasDepContext in DepGraph::with_task 2026-02-17 17:30:55 +11:00
rustc_resolve Make suggestion verbose and fix incorrect suggestion usage 2026-02-17 16:51:53 +00:00
rustc_sanitizers Include assoc const projections in CFI trait object 2026-02-01 22:45:43 +08:00
rustc_serialize Remove unused features in compiler 2026-02-13 09:25:39 +08:00
rustc_session Remove code for ThinLTO from cg_gcc 2026-02-15 10:05:48 +00:00
rustc_span Rollup merge of #151783 - mu001999-contrib:impl/final-method, r=fee1-dead 2026-02-17 13:02:21 +11:00
rustc_symbol_mangling Stabilize assert_matches 2026-02-11 14:13:44 +01:00
rustc_target Rollup merge of #152552 - androm3da:hexagon-hvx-abi-rules, r=madsmtm 2026-02-13 15:19:15 +11:00
rustc_thread_pool Fix typos and grammar in compiler and build documentation 2026-02-10 10:22:05 -05:00
rustc_trait_selection Auto merge of #152738 - workingjubilee:revert-unsound-ice-patch, r=mati865 2026-02-17 09:36:10 +00:00
rustc_traits implied bounds comments 2026-01-19 16:08:54 +00:00
rustc_transmute Clean up src/dst transmute mess. 2026-01-12 09:22:58 +11:00
rustc_ty_utils Rollup merge of #151783 - mu001999-contrib:impl/final-method, r=fee1-dead 2026-02-17 13:02:21 +11:00
rustc_type_ir Rollup merge of #149904 - ShoyuVanilla:ns-remove-sg-hack, r=lcnr 2026-02-17 14:18:44 +01:00
rustc_type_ir_macros Provide an extended framework for type visit, for use in rust-analyzer 2025-12-16 01:47:28 +02:00
rustc_windows_rc