mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
![bors[bot]](/assets/img/avatar_default.png)
11540: fix: Resolve private fields in type inference r=flodiebold a=Veykril Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10253#issuecomment-920962927 (the same issue probably exists for method calls, but I think fixing that might be trickier) Visibility checks were introduced in https://github.com/rust-analyzer/rust-analyzer/issues/7841 for autoderef to work properly, so now we just record the first field we find unconditionally, and then overwrite it if autoderef manages to find another field in a later cycle. Co-authored-by: Lukas Wirth <lukastw97@gmail.com>