"The adulterer shall not marry except an adulteress or a polytheist," and the verse. Some of them explain it by saying: It was revealed concerning every male and female adulterer, then it was abrogated.
Yahya narrated from Nasr ibn Tarif, who said: Sa'id ibn al-Musayyib said: "The verse 'And marry the unmarried among you' abrogated it."
["And that has been made unlawful to the believers," meaning: It is not permissible for a believer to marry a woman known for adultery, nor a female idolater, and it is not permissible for a believing woman to marry a male idolater, nor a man known for adultery.]
Surat an-Nur from (verse 4 to verse 10).
﴿الزَّانِي لَا يَنْكِحُ إِلا زَانِيَةً﴾ الْآيَةُ، تَفْسِيرُ بَعْضِهِمْ يَقُولُ: نَزَلَتْ فِي كُلِّ زَانٍ وَزَانِيَةٍ، ثُمَّ نُسِخَتْ.
يَحْيَى: عَنْ نَصْرِ بْنِ طَرِيفٍ قَالَ: قَالَ سَعِيدُ بْنُ الْمُسَيِّبِ: " نَسَخَتْهَا ﴿وَأَنْكِحُوا الأَيَامَى مِنْكُمْ﴾ ". [﴿وَحرم ذَلِك على الْمُؤمنِينَ﴾ يُرِيدُ لَا يَحِلُّ لِلْمُؤْمِنِ أَنْ يَتَزَوَّجَ زَانِيَةً مَشْهُورَةَ بِالزِّنَا، وَلَا عَبَدَةَ الْأَصْنَامِ، وَلَا يَحِلُّ لِمُؤْمِنَةٍ أَنْ تَتَزَوَّجَ مُشْرِكًا مِنْ عَبَدَةِ الْأَصْنَام، وَلَا مَشْهُورا بِالزِّنَا].
سُورَة النُّور من (آيَة ٤ آيَة ١٠).