diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-05-22 16:02:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-22 16:02:28 +0200 |
| commit | 3216098e5344ee0f2e387e3901c4ff24ba40bf2c (patch) | |
| tree | c9449cedf11c46aeef00c8e2a37971eb754b5313 /compiler/rustc_hir_analysis/messages.ftl | |
| parent | 706dc7091628735e29c9061df6ecfdb38c55b651 (diff) | |
| parent | 8c37c8c3e6133ae431bc4a5aec1c7b21a3134969 (diff) | |
| download | rust-3216098e5344ee0f2e387e3901c4ff24ba40bf2c.tar.gz rust-3216098e5344ee0f2e387e3901c4ff24ba40bf2c.zip | |
Rollup merge of #140218 - fmease:hirtylo-clean-up-path-low, r=compiler-errors
HIR ty lowering: Clean up & refactor the lowering of type-relative paths While rebasing #126651 I realized that HIR ty lowering could benefit from some *spring cleaning* now that it's been extended to handle RTN and mGCA paths. More seriously, similar to my merged PR #118668 which unified the handling of all *associated item constraints* (assoc ty, const (ACE) & fn (RTN)), this PR (commit https://github.com/rust-lang/rust/pull/140218/commits/695fcf517d8864b4812225643ef8cfc036ba9f61) partially[^1] deduplicates the resolution code for all *type-relative paths* (assoc ty, const (mGCA) & fn (RTN)). **Why**? DRY'ing that part of the code means PR #126651 will automatically support RTN paths like `Ty::AssocTy::assoc_fn(..)` and it also implies shared diagnostic code and thus better diagnostics for RTN. --- The other commits represent cleanups, renamings, moves. More notably, I've renamed path lowering methods to be a lot more descriptive, so ones lowering `QPath(Resolved)` paths now have `_resolved_` in their name and ones lowering `QPath(TypeRelative)` paths now have `_type_relative_` in their name. This should make it stupidly obvious what their purpose is. --- Best reviewed commit by commit. The changes are close to trivial but the diff might make it look hairier. r? compiler-errors [^1]: Sadly, I couldn't unify as much compared to the other PR without introducing unnecessary `unreachable!()`s or rendering the code otherwise illegible with flags and micro helper traits.
Diffstat (limited to 'compiler/rustc_hir_analysis/messages.ftl')
| -rw-r--r-- | compiler/rustc_hir_analysis/messages.ftl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_hir_analysis/messages.ftl b/compiler/rustc_hir_analysis/messages.ftl index f7f2b78f052..a3a0e276f74 100644 --- a/compiler/rustc_hir_analysis/messages.ftl +++ b/compiler/rustc_hir_analysis/messages.ftl @@ -37,7 +37,7 @@ hir_analysis_assoc_kind_mismatch = expected {$expected}, found {$got} hir_analysis_assoc_kind_mismatch_wrap_in_braces_sugg = consider adding braces here -hir_analysis_associated_type_trait_uninferred_generic_params = cannot use the associated {$what} of a trait with uninferred generic parameters +hir_analysis_associated_type_trait_uninferred_generic_params = cannot use the {$what} of a trait with uninferred generic parameters .suggestion = use a fully qualified path with inferred lifetimes hir_analysis_associated_type_trait_uninferred_generic_params_multipart_suggestion = use a fully qualified path with explicit lifetimes |
