mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-29 11:51:31 +03:00
6f13b5244c
Point turbofish inference errors at the uninferred generic arg Follow-up to rust-lang/rust#153751. When a method call has a turbofish with an uninferred generic argument, point the diagnostic span at the specific `_` that couldn't be inferred instead of the method name. Before: ```rust LL | S.f::<u32, _>(42); | ^ cannot infer type of the type parameter `B` ``` After: ```rust LL | S.f::<u32, _>(42); | ^ cannot infer type of the type parameter `B` ``` Path expressions (`None::<_>`, `foo::<_>()`) are not handled yet, that's a separate code path. cc @eggyal