He (Bashir) said: When I was walking with the Messenger of Allah (ﷺ) he passed by the graves of the polytheists. He said: They lived before (a period of) Abundant good. He said this three times. He then passed by the graves of Muslims. He said: They received Abundant good.
The Messenger of Allah (ﷺ) suddenly saw a man walking in shoes between the graves. He said: O man, wearing the shoes! Woe to you! Take off your shoes. So the man looked (round), When he recognized the Messenger of Allah (ﷺ), he took them off and threw them away.
In-book : Book 21, Hadith 142
English translation : Book 20, Hadith 3224