It was proposed that he (the Holy Prophet) be married to the daughter of Hamza, whereupon he said: She is not lawful for me for she is the daughter of my foster-brother, and that is unlawful by reason of fosterage what is unlawful by reason of genealogy. (Using translation from Muslim 1447a)
أَنَّ النَّبِيَّ ﷺ أُرِيدَ عَلَى بِنْتِ حَمْزَةَ فَقَالَ «إِنَّهَا لَا تَحِلُّ لِي؛ إِنَّهَا ابْنَةُ أَخِي مِنَ الرَّضَاعَةِ وَيَحْرُمُ مِنَ الرَّضَاعَةِ مَا يَحْرُمُ مِنَ النَّسَبِ»