Auto merge of #54743 - ljedrz:cleanup_ty_p2, r=zackmdavis
Cleanup rustc/ty part 2
The second part of cleanups and minor improvements for rustc/ty.
- improve allocations
- calculate span after a possible early continue
- simplify some patterns
- mark a comment as FIXME
- whitespace fixes
The PR is independent from from the first part.