Sahih Muslim 193c
Anas b. Malik reported: The Prophet of Allah (may peace be, upon him) said: Allah will gather the believers on the Day of Resurrection and they would be made mindful of it;
and the rest (of the hadith) is like the one narrated above;
and then he mentioned the fourth time: And I (the Holy Prophet) would say: O my Lord, no one is left in the Fire except he whom the Qur'an has restrained, i e. eternally doomed.
حَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا مُعَاذُ بْنُ هِشَامٍ، قَالَ حَدَّثَنِي أَبِي، عَنْ قَتَادَةَ، عَنْ أَنَسِ بْنِ مَالِكٍ، أَنَّ نَبِيَّ اللَّهِ ﷺ قَالَ " يَجْمَعُ اللَّهُ الْمُؤْمِنِينَ يَوْمَ الْقِيَامَةِ فَيُلْهَمُونَ لِذَلِكَ " بِمِثْلِ حَدِيثِهِمَا وَذَكَرَ فِي الرَّابِعَةِ " فَأَقُولُ يَا رَبِّ مَا بَقِيَ فِي النَّارِ إِلاَّ مَنْ حَبَسَهُ الْقُرْآنُ أَىْ وَجَبَ عَلَيْهِ الْخُلُودُ " .