Move diagnostics code out of the critical path Follow up to #65077. r? @nnethercote
ForeignItem.node
ForeignItem.kind
Item.node
Item.kind
sty
kind
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc guide.