We were with the Messenger of Allah ﷺ and had no wives. We said, "Messenger of Allah, shall we not castrate ourselves?" He forbade us from doing so, then recited, "O you who believe, do not forbid the good things which Allah has made lawful for you" [Maidah 5:87].
حدثنا يحيى بن زكريا قال أخبرني إسماعيل عن قيس
كنا مع رسول الله ﷺ ليس لنا نساء قلنا يا رسول الله ألا نستخصي فنهانا عن ذلك فقال {يا أيها الذين آمنوا لا تحرموا طيبات ما أحل الله لكم} الآية