Sahih al-Bukhari, Book 92, Hadith 62 (Bukhari 6846)

Narrated Abu Huraira:

The Prophet (ﷺ) said, "The Hour will not be established till a man passes by a grave of somebody and says, 'Would that I were in his place.' "