(18) بَاب لَا تَقُومُ السَّاعَةُ حَتَّى يَمُرَّ الرَّجُلُ بِقَبْرِ الرَّجُلِ فَيَتَمَنَّى أَنْ يَكُونَ مَكَانَ الْمَيِّتِ مِنْ الْبَلَاءِ
Abu Huraira reported Allah's Messenger (ﷺ) as saying:
The Last Hour would not come until a person would pass by a grave of another person and he would say: I wish it had been my abode.
Reference: Sahih Muslim 157 j
In-book reference: Book 54, Hadith 67
USC-MSA web (English) reference(deprecated numbering scheme): Book 41, Hadith 6947