This may be able to use `ty::lookup_item_type`, although it's not exactly the same, just an idea!