rust/tests
bors 7b552967b8 Auto merge of #105961 - fmease:iat-type-directed-probing, r=jackh726
Type-directed probing for inherent associated types

When probing for inherent associated types (IATs), equate the Self-type found in the projection with the Self-type of the relevant inherent impl blocks and check if all predicates are satisfied.
Previously, we didn't look at the Self-type or at the bounds and just picked the first inherent impl block containing an associated type with the name we were searching for which is obviously incorrect.

Regarding the implementation, I basically copied what we do during method probing (`assemble_inherent_impl_probe`, `consider_probe`). Unfortunately, I had to duplicate a lot of the diagnostic code found in `rustc_hir_typeck::method::suggest` which we don't have access to in `rustc_hir_analysis`. Not sure if there is a simple way to unify the error handling. Note that in the future, `rustc_hir_analysis::astconv` might not actually be the place where we resolve inherent associated types (see https://github.com/rust-lang/rust/pull/103621#issuecomment-1304309565) but `rustc_hir_typeck` (?) in which case the duplication may naturally just disappear. While inherent associated *constants* are currently resolved during "method" probing, I did not find a straightforward way to incorporate IAT lookup into it as types and values (functions & constants) are two separate entities for which distinct code paths are taken.

Fixes #104251 (incl. https://github.com/rust-lang/rust/issues/104251#issuecomment-1338501171).
Fixes #105305.
Fixes #107468.

`@rustbot` label T-types F-inherent_associated_types
r? types
2023-02-20 00:37:20 +00:00
..
assembly Update the minimum external LLVM to 14 2023-02-10 16:06:25 -08:00
auxiliary
codegen Auto merge of #107921 - cjgillot:codegen-overflow-check, r=tmiasko 2023-02-19 18:17:26 +00:00
codegen-units
debuginfo Upgrade mingw-w64 on CI 2023-01-29 13:01:06 +01:00
incremental
mir-opt Replace _with_overflow instrinsics in LowerIntrinsics. 2023-02-18 21:45:10 +00:00
pretty Update tests. 2023-01-29 20:19:26 +01:00
run-make Auto merge of #105601 - BelovDV:change-rlib-with-not-stable, r=petrochenkov 2023-02-12 07:15:27 +00:00
run-make-fulldeps Remove save-analysis. 2023-02-16 15:14:45 +11:00
run-pass-valgrind
rustdoc Rollup merge of #108129 - GuillaumeGomez:correctly-handle-links-starting-with-whitespace, r=petrochenkov 2023-02-19 14:47:55 +01:00
rustdoc-gui Rollup merge of #107783 - notriddle:notriddle/item-table-ul, r=GuillaumeGomez 2023-02-19 13:03:41 +05:30
rustdoc-js rustdoc: update test cases to match with stricter match criteria 2023-01-21 00:11:39 -07:00
rustdoc-js-std rustdoc: hide reference methods in search index 2023-02-16 17:21:57 -07:00
rustdoc-json Add regression test for #107677 2023-02-18 18:28:17 +01:00
rustdoc-ui Rollup merge of #107951 - petrochenkov:procmacdoc, r=jackh726 2023-02-19 13:03:41 +05:30
ui Auto merge of #105961 - fmease:iat-type-directed-probing, r=jackh726 2023-02-20 00:37:20 +00:00
ui-fulldeps Forbid #[suggestion_*(...)] on Vecs 2023-02-01 21:49:45 +01:00
COMPILER_TESTS.md