Sahih Muslim Book 41, Hadith Number 6947.
Chapter : The Last Hour would not come until a person would pass by a grave and wish that he should have been the occupant of that grave because of this calamity.
Abu Huraira reported Allah’s Messenger (may peace be upon him) 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.