rust-analyzer/crates/hir-ty/src/tests
bors 7a704f2cc7 Auto merge of #13147 - lowr:fix/dyn-ty-inherent-methods, r=Veykril
fix: handle trait methods as inherent methods for trait-related types

Fixes #10677

When resolving methods for trait object types and placeholder types that are bounded by traits, we need to count the methods of the trait and its super traits as inherent methods. This matters because these trait methods have higher priority than the other traits' methods.

Relevant code in rustc: [`assemble_inherent_candidates_from_object()`](0631ea5d73/compiler/rustc_typeck/src/check/method/probe.rs (L783-L792)) for trait object types, [`assemble_inherent_candidates_from_param()`](0631ea5d73/compiler/rustc_typeck/src/check/method/probe.rs (L838-L847)) for placeholder types. Notice the second arg of `push_candidate()` is `is_inherent`.
2022-09-12 12:19:14 +00:00
..
coercion.rs fix: infer lhs first on ordinary assignment expressions 2022-07-03 03:29:02 +09:00
diagnostics.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
display_source_code.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
incremental.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
macros.rs Remove unnecessary allocations 2022-08-31 18:05:52 +02:00
method_resolution.rs fix: handle trait methods as inherent methods for placeholders 2022-08-31 01:12:14 +09:00
never_type.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
patterns.rs fix: resolve path Self alone in value namespace 2022-08-18 20:12:59 +09:00
regression.rs Remove unnecessary allocations 2022-08-31 18:05:52 +02:00
simple.rs Fix nested break expressions, expecting unknown types 2022-09-03 17:32:21 +02:00
traits.rs fix: sort all bounds on trait object types 2022-09-05 19:13:32 +09:00