صحيح مسلم Sahih Muslim كتاب الصيام The Book of Fasting
باب بَيَانِ نَسْخِ قَوْلِهِ تَعَالَى: {وَعَلَى الَّذِينَ يُطِيقُونَهُ فِدْيَةٌ} بِقَوْلِهِ: {فَمَنْ شَهِدَ مِنْكُمُ الشَّهْرَ فَلْيَصُمْهُ}:

Chapter: The Saying of Allah Most High: "... And as for those who can fast with difficulty, they have) a choice either to fast or) to feed a Miskin (poor person) (for every day)" is Abrogated by His saying: "... So whoever of you sights (the crescent on the first night of) the month (of Ramadan i.e. is present at his home), he must observe Sawm (fasts) that month"...

2 hadith
Hadith 1145
حَدَّثَنَا حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ ، حَدَّثَنَا بَكْرٌ يَعْنِي ابْنَ مُضَرَ ، عَنْ عَمْرِو بْنِ الْحَارِثِ ، عَنْ بُكَيْرٍ ، عَنْ يَزِيدَ مَوْلَى سَلَمَةَ ، عَنْ سَلَمَةَ بْنِ الْأَكْوَعِ رَضِيَ اللَّهُ عَنْهُ ، قَالَ : " لَمَّا نَزَلَتْ هَذِهِ الْآيَةُ وَعَلَى الَّذِينَ يُطِيقُونَهُ فِدْيَةٌ طَعَامُ مِسْكِينٍ سورة البقرة آية 184 كَانَ مَنْ أَرَادَ أَنْ يُفْطِرَ وَيَفْتَدِيَ ، حَتَّى نَزَلَتِ الْآيَةُ الَّتِي بَعْدَهَا فَنَسَخَتْهَا " .
Salama bin Akwa' (RA) reported that when this verse was revealed: "And as for those who can fast (but do not) expiation is the feeding of a needy person" (ii. 183), (he who liked to observe fast did observe it) and he who felt reluctant to observe it ate and expiated till the verse was revealed which abrogated it.
Hadith Reference Sahih Muslim / The Book of Fasting / Hadith: 1145
Hadith Grading محدثین: أحاديث صحيح مسلم كلها صحيحة
Hadith Takhrij «أحاديث صحيح مسلم كلها صحيحة»
Hadith 1145
حَدَّثَنِي عَمْرُو بْنُ سَوَّادٍ الْعَامِرِيُّ ، أَخْبَرَنَا عَبْدُ اللَّهِ بْنُ وَهْبٍ ، أَخْبَرَنَا عَمْرُو بْنُ الْحَارِثِ ، عَنْ بُكَيْرِ بْنِ الْأَشَجِّ ، عَنْ يَزِيدَ مَوْلَى سَلَمَةَ بْنِ الْأَكْوَعِ ، عَنْ سَلَمَةَ بْنِ الْأَكْوَعِ رَضِيَ اللَّهُ عَنْهُ ، أَنَّهُ قَالَ : " كُنَّا فِي رَمَضَانَ عَلَى عَهْدِ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ مَنْ شَاءَ صَامَ ، وَمَنْ شَاءَ أَفْطَرَ فَافْتَدَى بِطَعَامِ مِسْكِينٍ ، حَتَّى أُنْزِلَتْ هَذِهِ الْآيَةُ فَمَنْ شَهِدَ مِنْكُمُ الشَّهْرَ فَلْيَصُمْهُ سورة البقرة آية 185 " .
Salama bin Akwa' reported: We, during the lifetime of the Messenger of Allah (ﷺ) , in one month of Ramadan (observed fast according to our liking). He who wished to fast lasted and he who wished to break broke it and fed a needy person as an expiation (1544) till this verse was revealed: "He who witnesses among you the month (of Ramadan) he should observe fast during it" (ii. 184).
Hadith Reference Sahih Muslim / The Book of Fasting / Hadith: 1145
Hadith Grading محدثین: أحاديث صحيح مسلم كلها صحيحة
Hadith Takhrij «أحاديث صحيح مسلم كلها صحيحة»