Fix suggestion to constrain trait for method to be found Fix #65044.
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.