Remove some uses of `guess_head_span` That function cuts a span at the first occurrence of `{`. Using `def_span` is almost always more precise.
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.