diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-15 10:14:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-15 10:14:56 +0100 |
| commit | 277df5e17663ceef2848119b2fa3cec074e36298 (patch) | |
| tree | 44363d9a0f9f75ae41eafe2b59703e6b7de69d27 /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | 7a7b65abbe7ee040776f644bbf7d873b25100fce (diff) | |
| parent | 5beda81b71509175f1661361a56eb8306b730639 (diff) | |
| download | rust-277df5e17663ceef2848119b2fa3cec074e36298.tar.gz rust-277df5e17663ceef2848119b2fa3cec074e36298.zip | |
Rollup merge of #122527 - fmease:clean-up-hir-ty-lowering, r=compiler-errors
Clean up AstConv Split off from #120926 to make it only contain the renaming & (doc) comment updates. Any changes other than that which have accumulated over time are now part of this PR. Let's be disciplined ;) Inspired by https://github.com/rust-lang/rust/pull/120926#issuecomment-1997984483. --- * Remove `hir_trait_to_predicates` * Unused since #113671 * Inline `create_args_for_ast_trait_ref` * Only had a single call site * Having it as a separate method didn't gain us anything * Use an if-let guard somewhere to avoid unwrapping * Avoid explicit trait object lifetimes * More legible, stylistic-only (the updated code is 100% semantically identical) * Use explicitly elided lifetimes in impl headers, they get elaborated to distinct lifetimes * Make use of [object lifetime defaulting](https://doc.rust-lang.org/reference/lifetime-elision.html#default-trait-object-lifetimes) for a trait object type inside of a reference type somewhere * Use preexisting dedicated method `ItemCtxt::to_ty` over `<dyn AstConv<'_>>::ast_ty_to_ty` * Use preexisting dedicated method `AstConv::astconv` over explicit coercions * Simplify the function signature of `create_args_for_ast_path` and of `check_generic_arg_count` * In both cases redundant information was passed rendering the call sites verbose and confusing * No perf impact (tested in [#120926](https://github.com/rust-lang/rust/pull/120926)) * Move diagnostic method `report_ambiguous_associated_type` from `astconv` to `astconv::errors` * The submodule `errors` exists specifically for that purpose * Use it to keep the main module clean & short
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
