rust-analyzer/crates/test-utils
Chayim Refael Friedman 50384460c6 Rewrite method resolution to follow rustc more closely
It cannot be exactly the same, because we have needs rustc doesn't have (namely, accurate enumeration of all methods, not just with a specific name, for completions etc., while rustc also needs a best-effort implementation for diagnostics) but it is closer than the previous impl.

In addition we rewrite the closely related handling of operator inference and impl collection.

This in turn necessitate changing some other parts of inference in order to retain behavior. As a result, the behavior more closely matches rustc and is also more correct.

This fixes 2 type mismatches on self (1 remains) and 4 diagnostics (1 remains), plus some unknown types.
2025-11-05 18:43:36 +02:00
..
src Rewrite method resolution to follow rustc more closely 2025-11-05 18:43:36 +02:00
Cargo.toml Don't run doctests 2025-06-23 00:50:22 +03:00