Sahih Muslim, Book 2, Hadith 85 (Muslim 615)

Abu Huraira reported:

The Messenger of Allah (ﷺ) said: Be on your guard against two things which provoke cursing. They (the companions present there) said: Messenger of Allah, what are those things which provoke cursing? He said: Easing on the thoroughfares or under the shades (where they take shelter and rest).