Some fixes to diagnostics and lints

I’m not so sure about the way I’ve handled #17567, but at least the error message is an improvement over what it was before (albeit still not quite as good as it was before DST).
I think this should still read ``unable to infer enough type information about `{}`; type annotations required`` and maybe also report the obligation cause with `note_obligation_cause(fcx, obligation);` so that the user can learn why it is that Rust needs to know the type.